Question: Write a function called roll_dice which takes, in order, a number representing the number of dice and a number representing the number of sides on

 Write a function called roll_dice which takes, in order, a number

Write a function called roll_dice which takes, in order, a number representing the number of dice and a number representing the number of sides on the dice. The function should print a dice roll with a value between 1 and the number of sides on the die for each of the number of dice. You should seed the random number generator with the value 10. You should make two successive calls to this function using the values 4, 8 and 5, 10. You may hard code these values into your main function. Write a function called roll_no_pair_dice which takes, in order, a number representing the number of dice and a number representing the number of sides on the dice. You should seed the random number generator with the value 10. This version of rolling the dice will only print rolls where the two die have different numbers. For instance, two rolls of two 6-sided dice could result in: 1 34 6 But not: 1 1 2 3 You must call your is equal function to test whether the two die are the same. You should make one call to this function using the values 5, 10. You may hard code these values into your main function LAB ACTIVITY 7.31.1: Homework 5 - Functions 0/15 | main.py Load default template... 1 import random 2 # Write your functions here in 000 11 def main(): # call your functions here 14 15 maino

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!