Question
IS 352 Exercises Iteration 1. Write an application that prints the value of a variable 3 times (must be a loop). 2. Write an application
IS 352 Exercises Iteration
1. Write an application that prints the value of a variable 3 times (must be a loop).
2. Write an application that asks the user for a number. Print that number that many times (e.g., if the user gives the number 4, your program would print 4 four times).
3. Create a countdown. Write a program that counts down from 10 to 1. When your application reaches 1, print Blast off!
4. Create an adding machine. Ask the user to enter an unknown number of numbers (one at a time). Stop collecting numbers when the user enters 0. Report the count, sum and average.
5. Create a multiplication table. Prompt the user for a number and output the multiplication table (from 1 to 10) for that number.
6. Write a program to guess a number. Think of a random number and ask the user to guess until they guess correctly.
7. Write a program to check credentials. Ask the user for their username and password. If the username/password matches student/greyhounds, grant them access. Give the user three tries.
8. Write a program that prints every number between 1 and 10,000 that is divisible by 7. At the end, report the count of those numbers.
9. Write a program to identify prime numbers. Prompt the user to enter a number and check whether it is a prime number (A number is prime if it is not evenly divisible by any number other than one or zeroyou only need to check divisors less than the entered value).
10. Create a digital typewriter. Prompt the user for input using the command input(> ) until they type the command DONE. When they are done typing, print out each line they typed.
Extra Credit
11. Write an application that prints a multiplication table (see exercise 5) for each number from 1 to 10. That is, the application will print multiplication tables for 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10
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