subject
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!")

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 12:50, tommy4260
Which syntax error in programming is unlikely to be highlighted by a compiler or an interpreter? a variable name misspelling a missing space a comma in place of a period a missing closing quotation mark
Answers: 1
image
Computers and Technology, 24.06.2019 01:30, kevin72836
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
image
Computers and Technology, 24.06.2019 01:30, tanya44737
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
image
Computers and Technology, 25.06.2019 02:30, asra44
One important thing in finding employment is to get your resume noticed and read. true or false
Answers: 2
You know the right 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
Chemistry, 28.09.2021 01:00
Konu
Physics, 28.09.2021 01:00
Konu
Computers and Technology, 28.09.2021 01:00