Skip to content

Commit 902948d

Browse files
Merge pull request #2251 from Anxhul10/master
[issue:#2010]:python file to add_two_number
2 parents a08717d + 1ced643 commit 902948d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

add_two_number.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
user_input = (input("type type 'start' to run program:")).lower()
2+
3+
if user_input == 'start':
4+
is_game_running = True
5+
else:
6+
is_game_running = False
7+
8+
9+
while (is_game_running):
10+
num1 = int(input("enter number 1:"))
11+
num2 = int(input("enter number 2:"))
12+
num3 = num1+num2
13+
print(f"sum of {num1} and {num2} is {num3}")
14+
user_input = (input("if you want to discontinue type 'stop':")).lower()
15+
if user_input == "stop":
16+
is_game_running = False
17+

0 commit comments

Comments
 (0)