Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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