What’s wrong? Can’t find the error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What’s wrong? Can’t find the error

def title(): #Says the title of the game print('*'*30) print('The Three Dice!') print('*'*30) time.sleep(2) def introMessage(): #Says hello to the player print('Hello! This is a Dice Rolling Game!') time.sleep(2) def playerName(): #Asks the player for their name and stores the name print('What is your name?') name = input() print("Let's get to rolling, " + name) time.sleep(2) def playerGuess(): #Asks the player for their guess of what the sum of the dice will be print('You will now roll three dice.') time.sleep(2) def diceRolls(): #Gets the numbers of the dice numbers = [random.randint(1, 6), random.randint(1, 6), random.randint(1, 6)] return numbers def printRolls(): #Tells the player what the dice show numbers = [random.randint(1, 6), random.randint(1, 6), random.randint(1, 6)] print('The first dice shows:' + str(numbers[0])) print('The second dice shows:' + str(numbers[1])) print('The third dice shows:' + str(numbers[2])) def totalSum(): #Adds the sum of the dice roll = str(diceRolls()) theSum = (roll[0] + roll[1] + roll[2]) return theSum def theDifference(): totalSum() difference = (guess - theSum) return difference def displayInfo(): #Displays the information to the player guess = input() return guess theDifference() print('The sum of the three dice rolls:' + theSum) print('Your estimate: ' + guess) print('The difference between your estimate and the actual sum: ' + difference) def goodbye(): #Thanks the player print('Thank you for participating!') title() introMessage() playerName() playerGuess() print('However, before you do so, what do you think the sum of the dice will be?') displayInfo() printRolls() displayInfo() goodbye()

5th Dec 2019, 4:34 PM
Brian Gura
Brian Gura - avatar
1 Answer
+ 2
We can't identify it what is going on here so please make this program in Sololearn Playground and share here.
5th Dec 2019, 4:58 PM
A͢J
A͢J - avatar