Question: IS 352 Exercises Functions 1. Write a function doubleIt() that accepts an integer as an input parameter. Return the doubled value. 2. Write a function

IS 352 Exercises Functions

1. Write a function doubleIt() that accepts an integer as an input parameter. Return the doubled value.

2. Write a function getCircumference() that accepts a number the radius of a circle. Return the circumference of the circle.

3. Write a function printMultiplicationTable() that accepts a number as an input parameter and prints multiplication table (from 1 to 10) for that number.

4. Write a function blastOff() that accepts a number as an input parameter and then counts down from that number to 1. When your application reaches 1, print Blast off!

5. Write a function paymentCalculator() that accepts a loan amount and the loan term as input parameters. The function should return their monthly payment.

6. Write a function playNumberGuess() that lets the user play a number guessing game. Return the outcome of the game (e.g., win or lose).

7. Write a function gradeIt() that accepts a number as an input parameter and returns the letter grade for that number (A: 100-90; B: 89-80; C: 79-70; D: 69-60; F: 59-0).

8. Write a function checkCredentials() that accepts a users username and password as input parameters. Return True/False indicating successful access.

9. Write a function getBet() that accepts a table max as an input parameter and prompts the user to enter a bet. Continue asking for a bet until the user enters a bet less than the table max. Return the value of the bet.

10. Write a function isPrime() that accepts an integer as an input parameter and returns a boolean value indicating whether the given number is prime

Extra Credit

11. Write a function showFunctionsMenu() that presents the user with a list of options and prompts the user which task they want to perform. The menu should match the order and functions for these exercises and should call the appropriate function (the 11th option should exit).

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!