belongs to collection: Python Loop Exercises
Given:
76542
Expected output:
24567
Solution:
num = 76542 reverse_number = 0 print("Given Number ", num) while num > 0: reminder = num % 10 reverse_number = (reverse_number * 10) + reminder num = num // 10 print("Revere Number ", reverse_number)
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Solution:
need an explanation for this answer? contact us directly to get an explanation for this answer