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 | |
count = 1 | |
turns = [] | |
comp_num = random.randint(1, 101) | |
while True: | |
user_guess = int(input("I'm thinking of a number between 1 and 100.\ | |
What is your guess? ")) |
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 | |
count = 1 | |
low_guess = [] | |
high_guess = [] | |
comp_num = random.randrange(1, 101) | |
while True: | |
user_guess = int(input("I'm thinking of a number between 1 and 100.\ |
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 | |
count = 1 | |
turns = [] | |
comp_num = random.randint(1, 101) | |
while True: | |
user_guess = int(input("I'm thinking of a number between 1 and 100.\ | |
What is your guess? ")) |
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
count = 0 | |
num_sum = 0 | |
strings = "" | |
while True: | |
if count == 0: | |
try: | |
user_input = input("Please choose a number: ") | |
if user_input == "": | |
break |
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
count = 0 | |
num_sum = 0 | |
while True: | |
try: | |
user_input = input("Please choose a number: ") | |
if user_input == "": | |
break | |
user_input = float(user_input) | |
count += 1 | |
num_sum += user_input |