1.Write a program that allows the user to enter a number of quarters, dimes, and nickels and then outputs the monetary value of the coins in cents. For example, if the user enters 2 for the number of quarters, 3 for the number of dimes, and 1 for the number of nickels, then the program should output that the coins are worth 85 cents.
You must create and use the following functions:
a.A function for inputting the number of coins. The function should take in as a parameter the type of coin being requested. The function should print the appropriate message for inputting the amount of that type of coin, for example “Please enter the number of dimes:”. The function should return the number of coins the user entered.
b.A function that computes the total value for the number of coins of a particular type. The function should take in as parameters the type of coin and the number of coins. The function should return the value for the amount of those types of coins.
2.Write a program that will allow the user to enter two numbers and perform a basic arithmetic operation on those two numbers. The arithmetic operations are addition, subtraction, multiplication, and division.
You must create and use the following functions:
a.A function that allows the user to input a single number.
b.A function that performs the addition of two parameters. The function should return the sum of the two parameters.
c.A function that performs the subtraction of two parameters. The function should return the difference of the two parameters.
d.A function that performs the multiplication of two parameters. The function should return the product of the two parameters.
e.A function that performs the division of two parameters. The function should return the quotient of the two parameters.
3.Indicate if the following identifiers are valid or invalid. If invalid then state why!
a)99agent
b)agent99
c)agent??
d)??agent
e)agent 99
f)agent_99
4. State if the following are invalid, true or false assuming num1=10, num2=5, num3=15
a.(Num1>=num2) || (num1<=num3)
b.Num1>=num2 && num3<num2
c.Num1<num2<num3
d.! (Num1=num2) AND (num1=num2+5)
e.!(num2<>num3)
f.Num1= 5 || 6
5.Write a program to input 10 numbers and to sum them up. The program should print “ok” if the sum is positive, and “not ok” if the sum is negative (or 0). Use a WHILE loop as appropriate. Then write a program using a FOR loop.
6.Write a program that would enter and multiply all inputted integers. The program must terminate when the user enters the first number 0. The program must also count how many numbers have been inputted. Test your program (dry-run) on the input 2,3,-2,4,0. The program must output -48 and 4.
7.Write the logic for a program that reads in character after character until the user enters the exclamation point ‘!’. The program should print the total number of characters entered, the total number of spaces entered ‘ ‘, and the number of times the letter ‘e’ was entered. You must use a while loop!

Order an Essay Now & Get These Features For Free:
Turnitin Report
Formatting
Title Page
Citation
Outline