How do you insert a sentence within a loop?

My program will ask the user to enter the number of lines for the sentence "I will always use object Oriented programming. " if for example, the user enters 3, it should print out

I will always use object Oriented programming. I will always use object Oriented programming. I will always use object Oriented programming.

the second part of my program asks the user to enter the line which we want to make a typo. If they enter 2, it will replace the "I will always use object Oriented programming. " with "I will always use object Oriented programing." in the second line.

this is how it should look like but I am having trouble putting the second part together. I don't know how to remove the sentence and replace it with the second part.

Enter the number of lines for the punishment: 6
Enter the line for which we want to make a typo: 3

I will always use object oriented programming. I will always use object oriented programming. I will always use object oriented programing. I will always use object oriented programming. I will always use object oriented programming. I will always use object oriented programming.


Can you post your code you have so far? because writing the code from scratch would be a hassle. Also I don't think I get the main concept of the program. but I think I am able to help you with this problem.
Topic archived. No new replies allowed.