Write A Program To Print Reverse Counting From 10 To 1 Using While Loop In Python

 Reverse a Number In Python

In this post, we learn how to reverse a number using a while loop in python

Program

Output


Program


Output


Algorithm To Reverse A Number

step1: Start

step2: Accept a number i.e num

step3: Sum = 0

step4: reminder = num%10                                                                              sum = sum*10+reminder                                                                      

num = num/10

step5: if num>0

step6: Display reverse number 

Flow chart for a Reverse number





Summary

Hope this post is beneficial for you. I hope it added value to your knowledge of python programming.

Post a Comment

0 Comments