Thursday, April 26, 2018

Lab 20

In this lab, its going to be a guessing game. There is a number that you, the player, have to guess. There will be a limit to how far you can guess. In this game, the number would be from 1 to 50. If the number you guess is lower than the answer, then the game would state a message saying to guess higher. If the number is higher than the answer, the game would say to guess lower. Guess the correct number and you win. in order to do this, we have to use Boolean expressions and logical statements. also mathematical concepts would need to be placed.

What i did first was make the condition on whether i want the random number to be between 2 restrictions. I decided to use the and statement, because using the or statement would make the code more complicated. Then i add the variable that restrict the answer to be only x. One thing that i learned in the lab is using Boolean statements in the lab. It allows me to further on develop my program and even abstract it. 




No comments:

Post a Comment

Junior Achievement Senior Year

In this service, 2 from the Web Design Academy and 2 from the Video Production academy are suppose to work together to teach a class about f...