subject

import random firstnum = random. randrange(1,11) # return an int from 1 to 10 secondnum = random. randrange(1, 11) compsum = firstnum + secondnum # adds the 2 random numbers together # print (compsum) # print for troubleshooting print("What is the sum of", firstnum, " +", secondnum, "?") # presents problem to user added = int(input("Your answer is: ")) # gets user input if added == compsum: # compares user input to real answer print("You are correct!!!") else: print ("Sorry, you are incorrect")

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:40
How many nibbles can be stored in a 16-bit word?
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Why is an outfitting a workspace with video games in a technology development company considered a strategic use of money
Answers: 1
question
Computers and Technology, 24.06.2019 12:10
What is it called during the editing process when the processor ensures that a character holding a coffee mug from one angle is holding the same mug in the same way when the shot switches to another camera at another angle? cinematography continuity technology prop use
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
Think of a spreadsheet as a giant calculator spread of paper chart data collector
Answers: 2
You know the right answer?
import random firstnum = random. randrange(1,11) # return an int from 1 to 10 secondnum = random. ra...
Questions
question
Engineering, 08.09.2021 19:10
question
Biology, 08.09.2021 19:10
question
Mathematics, 08.09.2021 19:10
question
Mathematics, 08.09.2021 19:10
Questions on the website: 13722367