8000 Number_Guessing_Name · Pcodias/intro-to-python@03f67e7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 03f67e7

Browse files
author
Replit user
committed
Number_Guessing_Name
1 parent 069d0fc commit 03f67e7

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

command_line_project/Readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
TO DO
2+
IN PROGRESS
3+
DONE

command_line_project/my_python_app.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import random
2+
Name= "Number_Guessing_Name"
3+
def guess_number_game():
4+
5+
secret_number=random.randint(1,100)
6+
7+
start = 1
8+
end = 100
9+
random_number = random.randint(start, end)
10+
print(random_number)
11+
12+
13+
start=1
14+
end=100
15+
16+
guess = int(input("Guess a number between 1 and 100: "))
17+
18+
if guess == secret_number:
19+
print("Congratulations! You guessed the correct number.")
20+
21+
if guess < secret_number:
22+
print("Too low. Try again.")
23+
else:
24+
print("Too high. Try again.")
25+
26+
categories = ("even", "odd")
27+
for category in categories
28+
print(categories)
29+
30+
31+
guess_number_game()
32+
33+

0 commit comments

Comments
 (0)
0