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
vazorg [7]
3 years ago
7

4. Write a program which selects two integer numbers randomly, adds the numbers and asks the user to enter the answer and then c

hecks if the answer is correct or not.
Computers and Technology
1 answer:
KIM [24]3 years ago
7 0

Answer:

import random

number1 = random.randrange(0, 1000)

number2 = random.randrange(0, 1000)

answer = int(input("Enter a number: "))

if answer == number1 + number2:

   print("Your answer is correct")

else:

   print("Your answer is not correct")

Explanation:

The code is in Python

Create two integer numbers using random

Ask the user for an input

Check if answer is equal to number1 + number2. If they are equal, print "answer is correct". Otherwise, print "answer is not correct".

You might be interested in
Is the following statement TRUE or FALSE?
Musya8 [376]

Answer:

A

Explanation:

click on typeface icon in toolbar menu

6 0
3 years ago
The intersection of a row and a column is commonly called what?
Ierofanga [76]
I dont know the answer sorry i just need the points
6 0
3 years ago
7.4 Lesson Practice (projectstem): what is output if the user is enters 2?​
Hatshy [7]

Answer:

18

Explanation:

lets go step by step.

the function called tryIt has a value, a variable named "a". this "a" variable will be whatever the user enters when the program says, Enter a number.

ok so if we enter "a" as 2, and b in the function will always be 7, and 2 + 7 equals 9,

and the ans variable (short for answer) will take the result of the function (9) and multiply it by 2,

then the answer is 18

3 0
3 years ago
Traffic shaping reduces traffic by ________. preventing certain undesirable traffic from entering the network limiting the amoun
Lera25 [3.4K]

Answer:

Explanation:

Traffic Shaping is a technique for managing congestion on a network by delaying the flow of less important/desired packets on the network so more valuable/desirables ones are able to pass. Traffic shaping reduces traffic by preventing certain undesirable traffic from entering the network as well as limiting the amount of certain undesirable traffic entering the network.

5 0
3 years ago
What is the answer of this Q?
Inga [223]

Answer:

Because of refraction.

Explanation:

Light coming from fish passes through two medium, one is water and another is air. As the density of medium is changing from high to low, the light bends away from the normal. So to the human eyes, the fish appears to be above its actual position.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Data about the size and composition of a population are gathered in a survey called _____.
    6·2 answers
  • Where would you look to see how much space is available on your c drive?
    8·1 answer
  • Hailey is preparing a questionnaire on the different number systems. He asks the students to write down the correct decimal and
    7·2 answers
  • Answer the following questions using the five different kinds of parallelism techniques: A - Instruction Level Parallelism B - D
    15·1 answer
  • Can you find the ip address from a physical address
    13·1 answer
  • An effective problem statement ensures that
    12·1 answer
  • What is the Internet address of the speech you listed to?
    14·1 answer
  • An analogue sensor has a bandwidth which extends from very low frequencies up to a maximum of 14.5 kHz. Using the Sampling Theor
    9·2 answers
  • I used the Pearson correlation coefficient for my study to test the correlation and how strong is the relationship between two v
    10·2 answers
  • Language is PYTHON
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!