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
GarryVolchara [31]
3 years ago
15

Create a program in Python that prompts the user to enter an integer number within the range of 1 to 10 inclusive. The program s

hould display “correct input” if the input is within the given range else it should display “wrong input”.

Computers and Technology
2 answers:
lapo4ka [179]3 years ago
8 0

Answer:

dont know if it works!

Explanation:

input=(input("enter number")

if input > 1

print("correct input")

if input <10

print("correct input")

else

print("wrong input")

Gwar [14]3 years ago
7 0

Python Code with Explanation:

# create a function named func to implement the required logic

def func():

# get the input from the user and store it in a variable named number

   number = int(input("Please enter an integer between 1 to 10 inclusive\n"))

# if the input number is equal or greater than 1 and equal to 10 or less then the input is correct    

   if number>=1 and number<=10:

# print correct input

       return print("Correct input")

# else the input is wrong

   else:

# print wrong input

       return print("Wrong input")

# call the function func

func()

Output:

Test 1:

Please enter an integer between 1 to 10 inclusive

4

Correct input

Test 2:

Please enter an integer between 1 to 10 inclusive

0

Wrong input

Test 3:

Please enter an integer between 1 to 10 inclusive

11

Wrong input

You might be interested in
Write a function called quadruple that quadruples a number and returns the result. Then make several calls to the quadruple func
valentina_108 [34]

def quadruple(n):

   return n*4

print(quadruple(3))

print(quadruple(1))

print(quadruple(2))

I wrote my code in python 3.8. I hope this helps.

7 0
3 years ago
Mrs. Ferrar is an older woman with a limited income. Which programs and services may assist her with obtaining healthy meals and
Kitty [74]

The programs and services that may assist her with obtaining healthy meals and becoming more physically active are:

1. food stamps or SNAP

2. food banks

5. community parks

6. community gardens

<h3>What are food stamps?</h3>

A food stamps is known to be a kind of voucher that is often issued very cheap by the state for low income and it is often exchangeable for food.

Note that The programs and services that may assist her with obtaining healthy meals and becoming more physically active are:

1. food stamps or SNAP

2. food banks

5. community parks

6. community gardens

See options below

food stamps or SNAP

food banks

WIC

NSLP

community parks

community gardens

Learn more about food stamps from

brainly.com/question/1085704

#SPJ12

5 0
2 years ago
create a class rectangle with attributes length and width, each of which defaults to 1. provide methods that calculate the recta
Ludmilka [50]

Answer:

20.0.0.0

Explanation:

4 0
4 years ago
What is an effective technique for searching the web?
Arte-miy333 [17]
Google.com, Bing, or Dark Web engines.
7 0
4 years ago
What is the purpose of a macro in a word processor?
Natali [406]
C : to determine error rate
8 0
3 years ago
Read 2 more answers
Other questions:
  • The difference between the various networks is the ______ of the coverage.
    11·2 answers
  • The operating system, and in particular the scheduler, is not an important component of a real-time system.
    14·1 answer
  • A #1 Phillips screwdriver has a shaft diameter of 
    13·1 answer
  • Label 14 parts of the inside of a computer
    6·1 answer
  • Grace Hopper led the development of ______, a programming language for business applications.
    6·2 answers
  • Dany needs to fact check notes she took on 19th
    13·1 answer
  • Modify theme in excel
    5·1 answer
  • i emailed someone and im sure that they emailed back however it says nothing has arrived in my inbox what do I do
    6·1 answer
  • 16. Your character qualities never change. (3 points)<br> A. True<br> B. False
    6·2 answers
  • What initialization vector (IV) do most weak implementations of the Wireless Equivalency Protocol (WEP) use
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!