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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 23:30, artursino
Me2540 week 5 assignment what do i want to know?
Answers: 1
image
Computers and Technology, 22.06.2019 06:30, iamquintix
Exchanging which type of data uses the least bandwidth? music photographs video voice bandwidth- the amount of data that can be moved between two points in a set time period
Answers: 1
image
Computers and Technology, 22.06.2019 09:50, brennarfa
17. implement the jvm dload instruction for the mic-2. it has a 1-byte index and pushes the local variable at this position onto the stack. then it pushes the next higher word onto the stack as well
Answers: 2
image
Computers and Technology, 22.06.2019 17:00, Janznznz1121
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best suited for this?
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 in other subjects:

Konu
Chemistry, 08.03.2021 16:40
Konu
Mathematics, 08.03.2021 16:40
Konu
Mathematics, 08.03.2021 16:40
Konu
Geography, 08.03.2021 16:40