Computers and Technology
Computers and Technology, 12.11.2020 17:10, musa79

Cans someone pls help me to do edhesive 2.5 code practice this si the question=Currently, this program will add 6 and 3 together, output the math problem and output the answer. Edit this code so that a random number is generated from 1 - 10 (inclusive) for the variables a and b. Also, instead of adding the two numbers together, the edited program should multiply them, and output the proper math problem and answer. Be sure to update every line of code to reflect the changes needed.
this is what I have but it gives an error
import random

random. seed(1,10)

a = random. randint (1,10)

b = random. randint (1,10)

print ("What is: " + str(a) + " X " + str(b) + "?")

ans = int(input("Your "))

if (a * b == ans):

print ("Correct!")

else:

print ("Incorrect!")

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 07:00, Jasten
For all machines-not just hammers- the user applies force force to the machine to the machine over a certain distance. a. input b. output c. duo d. none of the above
Answers: 1
image
Computers and Technology, 22.06.2019 10:30, ilovepickles930
What can tanya do now to start preparing for the college and scholarship application process? think about her grades, activities in which she can get involved, possible part-time jobs at which she can work, and standardized tests she can take. (10 points) apex
Answers: 2
image
Computers and Technology, 22.06.2019 18:30, lailahussain99
Which of the following is an example of intellectual properly! oa. new version of a novelb. journal of ideasc. pages of a bookood. lines of a poem
Answers: 2
image
Computers and Technology, 23.06.2019 06:00, hilarydodard7099
Which statistical function in a spreadsheet you to see how far each number varies, on average, from the average value of the list?
Answers: 2
Do you know the correct answer?
Cans someone pls help me to do edhesive 2.5 code practice this si the question=Currently, this prog...

Questions in other subjects:

Konu
Mathematics, 15.02.2021 08:20