1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Paladinen [302]
3 years ago
14

Need 2.5 Code Practice Answers

Computers and Technology
2 answers:
konstantin123 [22]3 years ago
4 1

Answer:

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 answer: "))  

if (a * b == ans):  

   print ("Correct!")  

else:  

   print ("Incorrect!")

Explanation:

iragen [17]3 years ago
3 1

Answer:

import random

#random.seed() should not be used here as this method will produce same number again and again

a = random.randint(1,11) #this method will generate random number between 1 and 10  

b = random.randint(1,11)

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

ans = int(input("Your answer: "))

if (a * b == ans):

   print ("Correct!")

else:

   print ("Incorrect!")

Output :

What is: 8 X 5?

Your answer: 40

Correct!

Explanation:

  • First for producing random numbers,random module has to be imported.
  • As mentioned in answer, random.seed() method is used to generate same random number again and again. Here we need to generate 2 different random numbers that is why we won't use this method.
  • To produce a random number, randint() method from random module is used. This method takes 2 parameters i.e. a low and high value. The low value is inclusive and the high value is exclusive. That is why , to get a number between [1,10], randint() takes 1 as low value(inclusive) and 11 as high value(exclusive).

Elo Lemon
3 years ago
This literally doesn’t work, I copy and pasted it into python and I get an EOD error when reading a line, help?!
You might be interested in
A list cannot use appendleft but a _____ can.
Dmitry [639]

Answer:

String

Explanation:

I think it is this one.

3 0
3 years ago
A___________ is a person who can give information to potential employers about your character and your abilities. Employer emplo
il63 [147K]
I believe the answer is reference.
6 0
4 years ago
Ideally, how often should you back up the data on your computer? once an hour, once a day, once a month, once a year. Please hur
Stells [14]

Explanation:

Every month or so

5 0
3 years ago
Read 2 more answers
A camera in manual mode means of the camera will make all the adjustments for the photographer
galben [10]
Manual mode is when the photographer makes all the adjustments themself
7 0
4 years ago
personalization allows customers to modify the standard offering, such as selecting a different home page to be displayed each t
shusha [124]
True, personalization is definitely part of this.
6 0
2 years ago
Other questions:
  • Submit your 300-word essay describing the equipment usedI in a well-equipped studio’s audio department and the training and expe
    8·2 answers
  • Pick an appliance or an electronic device that you use at home that is powered from the wall outlet. Specify which electronics d
    10·1 answer
  • An employee clicks on a link in an email from what looks like a fellow employee and is taken to a fraudulent web site which asks
    6·2 answers
  • Which of the following best describes the displayport interface used for connecting video monitors to computers
    11·1 answer
  • Que quiere decir analogico
    6·1 answer
  • Is the practice of downloading and distributing copyrighted content digitally without permission??
    14·1 answer
  • In binary, the second digit from the right is multiplied by the first power of two, and the _____ digit from the right is multip
    10·2 answers
  • Explain the importance of the educational apps.give an example to support your answer ​
    6·1 answer
  • Which of the following safety and privacy features is not included in a P2P app or service?
    5·2 answers
  • Carl is beginning a digital forensic investigation. he has been sent into the field to collect a machine. when he arrives, he se
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!