Skip to content

Commit

Permalink
Merge pull request #2251 from Anxhul10/master
Browse files Browse the repository at this point in the history
[issue:#2010]:python file to add_two_number
  • Loading branch information
geekcomputers authored Jun 22, 2024
2 parents a08717d + 1ced643 commit 902948d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions add_two_number.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
user_input = (input("type type 'start' to run program:")).lower()

if user_input == 'start':
is_game_running = True
else:
is_game_running = False


while (is_game_running):
num1 = int(input("enter number 1:"))
num2 = int(input("enter number 2:"))
num3 = num1+num2
print(f"sum of {num1} and {num2} is {num3}")
user_input = (input("if you want to discontinue type 'stop':")).lower()
if user_input == "stop":
is_game_running = False

0 comments on commit 902948d

Please sign in to comment.