GitHub

two_digit_number.py

#Write a program that adds the digits in a 2 digit number. #e.g. if the input was 35, then the output should be 3 + 5 = 8 # Try to find out the data type of two_digit_number. # Think about what you ...
for i in range(3,0,-1): # executes the loop 3 times. Giving 3 chances to the user. num = input("enter a number:") if num.isnumeric(): # checks if entered input is an ...