Python Exercise: Construct the following pattern, using a nested loop number
Python Conditional: Exercise - 44 with Solution
Write a Python program to construct the following pattern, using a nested loop number.
# Iterate through a range from 0 to 9 (excluding 10) for i in range(10): # Print the string representation of 'i' multiplied by 'i' print(str(i) * i)
1 22 333 4444 55555 666666 7777777 88888888 999999999
Python Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join