Question: This program has 8 options. The first number entered by the user indicates the option the user is selecting. Every option inputs a phrase from

This program has 8 options. The first number entered by the user indicates the option the user is selecting.

Every option inputs a phrase from the user. The output depends on the option the user selects.

instruction of restrictions of program:

  • the only type of loops you are allowed to use are 'for' loops
  • you may not use the 'break' command
  • any for loops you use must use the variable 'i' and the range() method.
  • you may not use string slicing

So the first line would follow this pattern:

  • for i in range ( ):

1.

This program has 8 options. The first number entered by the userindicates the option the user is selecting.Every option inputs a phrase fromthe user. The output depends on the option the user selects.instruction of

Option #4: outputs the phrase, replacing every occurance of the entered letter with a "* --- Input --- --- Expected output--- 6 dog food Option #5: outputs every second character of the phrase --- Input --- --- Expected output--- 7 dgfo dog food Option #6: outputs the phrase, backwards --- Input --- --- Expected output--- 8 doof tac cat food Option #7: outputs every second character of the phrase, backwards - Input --- --- Expected output--- 9 do a cat foodOption #8: Uses a counter to count how many times an entered letter occurs in the phrase and then outputs the number Input --- --- Expected output--- 10 3 dog food 10 razzle dazzle ZThis program has two options. The first number entered from the keyboard indicates the option the user is selecting. Restrictions: -You are not allowed to use: while, break Option 1: The user enters two numbers indicating a base and exponent. The output will be the power, followed by (if the exponent is greater than 1) the expanded form of the power, followed by the value of the power. The code for this option must use a for loop to generate the expanded form (for exponents greater than 1). - Sample Input - - Expected Output - 20=1 ONE 2*1=2 3 2-3*3:9 5*4-5*5*5*5-625 Option 2: Only the base (n) is entered. The output is the "Power Table' from n" to n. - Sample Input - - Expected Output -- 50=1 5*1=5 5 2-5*5=25 5*3-5*5*5=125 - - - several lines are skipped here - - - 5*10 5*5*5*5*5*5*5*5*5*5-9765625

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 Programming Questions!