Download presentation
Presentation is loading. Please wait.
Published byHande Ece Modified over 5 years ago
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.")
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.