Question: Write a script that ask the user to input an integer n. The script should print the factorials 1! up to n!, as shown in
Write a script that ask the user to input an integer n. The script should print the factorials 1! up to n!, as shown in the example below. Example: Enter a numbers 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 a number calls shiftedWord, and prints a message with the result. The driver should ask for another input string and a number, and stop when the user enters a negative number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
