Question: In this exercise, you will be writing a Python program that will do the following: 1. It will ask the user to specify a number.
In this exercise, you will be writing a Python program that will do the following:
1. It will ask the user to specify a number. And then specify a string.
2. Then it will output on the screen according to the following example.
Example - if the user enters 7 as the number and Ifrane as the string, your program will output:
1: Ifrane
2: Ifrane Ifrane
3: Ifrane Ifrane Ifrane
4: Ifrane Ifrane Ifrane Ifrane
5: Ifrane Ifrane Ifrane Ifrane Ifrane
6: Ifrane Ifrane Ifrane Ifrane Ifrane Ifrane
7: Ifrane Ifrane Ifrane Ifrane Ifrane Ifrane Ifrane
Note: Make sure the numbers are in the output as well as the spaces between the repeated strings.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
