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
After adding an image to her flyer, Danica played around to see which layout would look the best. At one point, her text was on
Norma-Jean [14]

Answer:

Position Feature

Wrap text feature

Picture tools

Explanation:

3 0
3 years ago
Read 2 more answers
Identfy two duties of the governer stationed at mombasa under portugues rule?​
Tpy6a [65]

Answer:I got u

Explanation:

6 0
3 years ago
Describe what a layer 3 router is and what are its advantages and drawbacks compared to other network devices.
Oduvanchick [21]

Answer:

Did you mean layer 3 switch? Because a router always operates at layer 3

Explanation:

If the answer is yes, then a layer 3 is a switch that combines the functions of a switch and a router. So it is capable of operate layer 2 and layer 3. Some of its benefits are: Support routing between VLAN, decrease network latency because the packets don’t have to make extra hops to go through a router and reduce security management. But they are really expensive and lack of WAN functionality so they are used mostly for large intranet environments.

3 0
4 years ago
What do you call the specific format that is used to give credit to someone else’s work, words or ideas?
Deffense [45]
It would be called a citation.
6 0
3 years ago
Read 2 more answers
What is the purpose of the fit to size feature in Word?
Olegator [25]

Answer : computer

Explanation:

please mark me as brilliant

3 0
3 years ago
Other questions:
  • Sarah's research shows that business information management professionals also perform the duties of other professionals. Which
    9·1 answer
  • What is the legal right granted to all authors and artists that gives them sole ownership and use of their words, software, pict
    9·2 answers
  • Jeffrey works with a huge database of spreadsheet records each day. To organize and identify these spreadsheets, he wants to ass
    8·1 answer
  • Which should you use to find a saved file?
    15·2 answers
  • Which of the following is true of how packets are sent through the Internet?
    11·2 answers
  • Why is network security important? Check all of the boxes that apply. A. Network security allows organizations to continue to fu
    8·1 answer
  • Emma lives in Pennsylvania, what climate does she live in?
    7·1 answer
  • Write 4 types of viruses , explain them briefly.
    7·1 answer
  • Which type of storage disk and disk drive can you use in the given situation?
    12·1 answer
  • Why do you want to work for Rev?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!