Question: import random random.seed ( 2 3 ) number _ pennies = random.randint ( 1 , int ( input ( Enter max value for a
import random
random.seed
numberpennies random.randint intinputEnter max value for a random amount of pennies:
printfnumberpennies pennies is equal to
# Generate a random number of pennies to convert
if numberpennies :
dollars numberpennies
printfdollars one dollar bills'
dol numberpennies
quarters dol
printfquarters quarters'
rem numberpennies
dimes rem
printfdimes dimes'
rem rem
nickels rem
printfnickels nickels'
rem rem
pennies rem
printfpennies pennies'
else:
print one dollar bills"
quarters numberpennies
printfquarters quarters'
rem numberpennies
dimes rem
printfdimes dimes'
rem rem
nickels rem
printfnickels nickels'
rem rem
pennies rem
printfpennies pennies'
# Convert the amount into its equivalent denominations
# Display the result
print
Have a nice day!"The convertpennies program solution is released. Use it to create a program called "randomconvertpennies". The program is similar
to the convertpennies program. The difference is that the number of pennies to convert will be generated at random, instead of being
an input from the user. The user, however, enters an integer value representing the maximum number of pennies to be generated. In this
program, use as the seed to the random number generator. Random number generation is discussed in the "Inch Conversion
Program Part VIDEO" in Session on DL
Please follow "Programming Style GuidelinePYTHON" while writing your program. It is in the References module on DL
Example execution of the program: When you run the program, it must first display the following prompt:
Enter max value for a random amount of pennies:
When you enter on the same line as the prompt, and press Enter, the program must display the following output:
pennies is equal to
one dollar bills
quarters
dimes
nickels
pennies
Have a nice day!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
