Exercise-5 loops Write a program that generates the following output: square 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 5 6 1 2 3 4 5 6 7 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10 end
Added by Jerry K.
Close
Step 1
We need to generate a series of numbers in a specific pattern. Show more…
Show all steps
Your feedback will help us improve your experience
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Write a Python program that will calculate the square, cube, and the fourth power of the numbers from 1 to 10. Hint: complete the following table.
Supreeta N.
Write a Python program that turns every item of a list into its square. Sample Input 1:[1, 2, 3, 4, 5, 6, 7] Sample Output 1:[1, 4, 9, 16, 25, 36, 49]
James K.
(Print a table) Write a program that displays the following table: $$\begin{array}{lll} a & a^{\wedge} 2 & a^{\wedge} 3 \\ 1 & 1 & 1 \\ 2 & 4 & 8 \\ 3 & 9 & 27 \\ 4 & 16 & 64 \end{array}$$
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD