Question
1.Write a script that calculates the squares and cubes of the numbers from 1 to 5. Print the resulting values in a table format. Use
1.Write a script that calculates the squares and cubes of the numbers from 1 to 5. Print the resulting values in a table format. Use the tab escape sequence to achieve the output.
2. Write a script that inputs three integers from a user. Display the sum, average, product, smallest and greatest of the numbers. Be sure to label each output.
3. Create a loop that finds the largest number of 10 numbers that the user enters.
4.Write a script that inputs a purchase price of a dollar or less. Assume the purchaser pays with a dollar bill. Determine the amount of change the cashier should give back to them. Display the change using the fewest amount of pennies, nickels, dimes, and quarters. For example, if the purchaser is due 73 cents, the output should be:
Your change is:
2 quarters
2 dimes
3 pennies
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started