CSC 127A Lecture Notes - Lecture 19: Filename Extension, Skip List
47 views3 pages
8 Oct 2016
School
Department
Course
Professor
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.