Presentation is loading. Please wait.

Presentation is loading. Please wait.

What does this code do? def digitsum(): code goes here def diffsum():

Similar presentations


Presentation on theme: "What does this code do? def digitsum(): code goes here def diffsum():"— Presentation transcript:

1 What does this code do? def digitsum(): code goes here def diffsum():
while True: answer = input("""Enter the number for the choice you want. 1 = Generate a list of all two digit numbers which are less than or equal to 56 and the sum of whose digits is greater than 10. 2 = Generate a list of all two digit numbers such that the number itself minus the number reversed is equal to the sum of its digits = Quit. Your choice: """) if answer == '1': digitsum() elif answer == '2': diffsum() elif answer == '0': break else: print("I dont understand. Please answer 0, 1, or 2.")


Download ppt "What does this code do? def digitsum(): code goes here def diffsum():"

Similar presentations


Ads by Google