week 5
Looked at test script that contains a few functions and some code. there where a few inherent errors that where hard to figure out.
there where a few new concepts I had not seen before, such as these strings contained within print commands. they take arguments by substituting the %s for arguments input after the script.
print("\n Script = %s " % script)
print(" variable 1 = %s" % variable1)
print(" variable 2 = %s" % variable2)
print(" variable 3 = %s" % variable3)
print(" variable 4 = %s" % variable4)
I have not seen code written like this before, so it came as a bit of a surprise how they worked.
the script imports: time, sys, and os. as far as I understand, the first module allows the script to be slowed down to allow the user to see parts of the program running. this is being utilized by the slow_write function that shows text being printed across the screen slowly by making use of the time module.
the last two modules utilize pythons ability to consult the operating system. these modules allow you to access the directory tree and also things like the system time.
the program itself is a quiz, not too much else to say.
Leave a comment
Log in with itch.io to leave a comment.