This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Empty file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| #Variables | |
| num1 = 0 | |
| num2 = 0 | |
| opr = "+" | |
| answer = 0 | |
| reply = "" | |
| replynum= random.randrange(0,4) | |
| while True: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| tries = 0 | |
| randomNum = random.randrange(1, 100) | |
| while tries<3: | |
| tries=tries+1 | |
| guess = int(input("Guess a number between 1 and 100")) | |
| if guess == randomNum: | |
| print("Correct") | |
| print("Game Over") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name1 = input("What is your first name?") | |
| name2 = input("What is your surname?") | |
| print("Hello ",name1,name2) |