Python Tutorial

Python Home

Python Methods

Python String Methods

Python Interview Programs

Python Common ProgramsPython Array ProgramsPython Converter ProgramsPython Star Patterns ProgramPython Number Patterns ProgramPython Alphabet Patterns Program

Python Reference

ASCII Table

Python Number Pattern 61

Last Updated:

Python Number Pattern 61

Try to print the following number pattern using Python.

Print This Output
3
32
325
3256
32568

Source Code

Python Compiler
import math num = 86523; reverse = 0; while(num != 0): reverse = reverse * 10 reverse = reverse + (num % 10) print(reverse, end="") num = math.floor(num / 10); print()

Share this Page

Meet the Author