CSC 127A Lecture Notes - Lecture 19: Filename Extension, Skip List

47 views3 pages

Document Summary

Functions should not call other functions over and over again, they should return to main, and maybe call one other function before returning back to the main function. Every time you change an aspect to your program, be sure to run your program to make sure that it still runs. If it does not, you can easily identify which part broke your program. It is now okay to use small functions in main, and an occasional print statement. File output: name. write(str) = will write the given string to the file name. close() = will close the file, make sure to do this step. Do not open ( guessing_game. py , w ) this will open the file, delete your already made code, and write over your code. For the next homework assignment, save the write file in a different directory to reduce the chance of writing over a file.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions