Week 3: Session 1
Activity 1: Review Week 2
Activity 2: Demostrate where file I/O is used in the Game.
Activity 3: What is I/O? Input/Output
str = input("Input your favorite color? ")
print ("Outputting your favorite color: ",str)#write
myfile = open("myfile","w")
myfile.write("hello")
myfile.close()
print (myfile.name, "is open?", myfile.closed)Exercise
Activity 4: What is "os"? Operating System
Test that a file exists
Working with Directories and Calling Programs from Code
Activity 5: Create a challenge that uses a file
Last updated