Question: # use randrange() function to simulate coin flip import random def user_guess(actual): guess = input(heads or tails? ) guess = guess.lower() if (actual == guess):

# use randrange() function to simulate coin flip import random def user_guess(actual): guess = input("heads or tails? ") guess = guess.lower() if (actual == guess): print("You got it" ) else: print("Wrong") def flip(): num = random.randrange (2) if (num == 1): return "heads" else: return "tails" def main(): coin = flip) user_guess (coin) main Question 1 (2 points) Is user_guess() a fruitful or non-fruitful function? non-fruitful fruitful Question 2 (2 points) Is randrange() a fruitful or non-fruitful function? non-fruitful fruitful
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
