Question: Write a script that ask the user to input an integer n. The script should print the factorials. If up to as shown in the

 Write a script that ask the user to input an integer

Write a script that ask the user to input an integer n. The script should print the factorials. If up to as shown in the example below. Example: Enter a number 1 4 1 = 1 1 * 2 = 2 1 * 2 * 3 = 6 1 * 2 * 3 * 4 = 24 Make sure you test your script with multiple input values. Write a function called shiftedWord which takes a string S and a number "n" as a input and returns the original string shifted n places to the right as shown in the examples below. ShiftedWord ('today', 3) = 'dayto' shiftedWord ('123456789;, 4) = '678912345' shiftedWord ('1234', 4) = '1234' Then write a driver that asks the user to type a word and number, calls shiftedWord, and prints a message with the result. The driver should ask for another input string and number, and stop when the user enters a negative number

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!