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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!