Wednesday, February 26, 2014

Weekly Reflection #4

This week I got to play a little game. In this game, the computer thinks of a random number from 1 to 20, and the user has to guess the number. The user is only given six attempts, the computer will however, tell you if your number is too high or too low. If you guess within six tries, you win.
In this chapter a learned a couple of new things. In the screenshots you'll probably notice some of the code in this game from the previous week where I learned about the input function. This week I learned about import statements. Statements are not functions, in the screenshot of the code you'll notice neither import nor random has parentheses after it's name like input() and print(). Besides import statements, other things I learned about this week where modules, arguments, while statements, conditions, comparison operators and if statements.

No comments:

Post a Comment