Page 1 of 1

1. Write a program that generates and prints 50 random integers, each between 3 and 6. 2. Write a program that generates

Posted: Mon Jun 06, 2022 1:45 pm
by answerhappygod
1 Write A Program That Generates And Prints 50 Random Integers Each Between 3 And 6 2 Write A Program That Generates 1
1 Write A Program That Generates And Prints 50 Random Integers Each Between 3 And 6 2 Write A Program That Generates 1 (81.04 KiB) Viewed 52 times
1. Write a program that generates and prints 50 random integers, each between 3 and 6. 2. Write a program that generates a random number, x, between 1 and 50, a random number y between 2 and 5, and computes x. [Hint: use pow(x,y)] 3. Write a program that generates a random number between 1 and 10 and prints your name that many times. 4. Write a program that generates a random decimal number between 1 and 10 with two decimal places of accuracy. Examples are 1.23, 3.45, 9.80, and 5.00. [Hint: use uniform() function from random module] 5. Write a program that generates 50 random numbers such that the first number is between 1 and 2, the second is between 1 and 3, the third is between 1 and 4, ..., and the last is between 1 and 51. 6. Write a program that asks the user for a number and prints out the factorial of that number. 7. Write a program that asks the user for a number of seconds and prints out how many minutes and seconds that is. For instance, 200 seconds is 3 minutes and 20 seconds. [Hint: Use the // operator to get minutes and the % operator to get seconds.]