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]
2 years ago
14

Need 2.5 Code Practice Answers

Computers and Technology
2 answers:
konstantin123 [22]2 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]2 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
2 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
Write a program to change background colour of your visual basic form with any 3 different events.​
Stels [109]

Answer:

To change the background color, select the form in Visual Studio and locate the BackColor property in the Properties panel. There are a number of ways to specify a color. Color by name - Simply type in a color name into the BackColor value field (for example Red, Yellow, Cyan etc).

Explanation:

4 0
2 years ago
Read 2 more answers
What does the poster exemplify?
zloy xaker [14]

Answer:

try D

Explanation:

8 0
3 years ago
Read 2 more answers
List any two features of this computer
zaharov [31]

Answer:

John Mauchy 1. designed to be a stored-program computer 2. it was binary rather than decimal

3 0
2 years ago
Word processing programs, spreadsheet programs, email programs, web browsers, and game programs belong to what category of softw
liq [111]

Answer:  They belong to a category of software known as Application program

Explanation: an application program is a computer program that is designed and implemented to carry out a specific task or for a specific purpose. Spreadsheet programs for instance are designed and implemented to carry out mathematical calculations, gaming programs for recreation, web programs for connecting to the internet and email programs for sending and receiving of emails.

6 0
2 years ago
Read 2 more answers
Which type of test is run in non-production subnets where you’ve configured a duplicate of the production environment?
LenKa [72]

Answer:

Laboratory Test

Explanation:

  • The lab test runs on a non-product subnet, where it configures duplicates of the production environment. It mirrors the entire system, including the firewall.
  • These test-runs test anything that interferes with the production environment.
  • so correct answer is Laboratory Test

3 0
3 years ago
Other questions:
  • Which of the following describes a hash algorithms ability to avoid the same output from two guessed inputs?A. Collision avoidan
    12·1 answer
  • Which of the following provides astronomical evidence for the age of the earth?
    11·1 answer
  • An Internet user has a need to send private data to another user. Which of the following provides the most security when transmi
    15·2 answers
  • A signal travels from point A to point B. At point A, the signal power is 100 W. At point B, the power is 90 W. What is the atte
    14·1 answer
  • What is the inverse function of d(x ) = -2x - 6?
    11·1 answer
  • Given the declarations struct BrandInfo { string company; string model; }; struct DiskType { BrandInfo brand; float capacity; };
    11·1 answer
  • _________ is the primary measurement used to gauge your typing ability
    10·1 answer
  • What is a fire wall and how does it work
    14·1 answer
  • Why do we install doorbells in our house
    11·2 answers
  • Your team has provisioned an Auto Scaling Groups in a single Region. The Auto Scaling Group at max capacity would total 40 EC2 i
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!