Question
Perform each problem separately. Complete in Python. *Do NOT install anything*. 1. Program that prints a randomly generated integer between 1 and 6. 2. Program
Perform each problem separately. Complete in Python. *Do NOT install anything*.
1. Program that prints a randomly generated integer between 1 and 6.
2. Program that takes input for the number of sides on the die. An n sided die should return a random integer between 1 and n with the same stipulations as in Exercise 1. You should take n from the user as typed input. Output should be the same as in #1.
3. Program that takes input for the number of dice to roll for the number of sides for the dice. Roll that many n-sided dice and store the values an array. Take the number of sides of the dice and the number of dice as typed inputs from the user. Output should be a comma separated list of the die numbers with no spaces like this:6,4,1,3,1
4. Program that will simulate the roll of an UNFAIR 6-sided die. Instead of each side having an even chance of coming up (1/6 = 16.7%), the middle numbers should be favored. There should be a 20% chance of rolling a 2, 3, 4, or 5, and only a 10% chance of rolling a 1 or a 6.
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