-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathchallenge3.py
More file actions
33 lines (24 loc) · 800 Bytes
/
challenge3.py
File metadata and controls
33 lines (24 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Guess the number
# Auther:
import random
play = "yes"
count = 0
#TODO: write the while condititons
while :
# TODO: take user input for number of rounds
numberOfrounds = int(input('How many rounds you want to play? '))
if numberOfrounds != 0:
# TODO: write the for loop
for :
print("******** Round: " + str(round+1) + " ********")
user = int(input("Choose number between 1 and 5: "))
computer = random.randint(1,5)
print("Computer: ", computer)
print("User: ", user)
# TODO: write if condition
if :
# TODO: add 1 to the count
count = count + 1
print("You Won " + str(count) + " times!")
# TODO: take user input for new game
play =