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
Which is the first calculating device invented?​
denis-greek [22]

Answer:the abacus

Explanation:

3 0
2 years ago
Read 2 more answers
_ effects determine how slide elements disappear
kupik [55]
<span>Exit effects determine how slide elements disappear. </span>
6 0
3 years ago
What is the full form of com​
nignag [31]

The answer is:

Commercial

3 0
3 years ago
Which major and minor keys have no sharps or flats apex?
9966 [12]
C major and A minor have no sharps or flats.
5 0
3 years ago
Read 2 more answers
The "fathers of the internet" are vinton cerf and ________.
Harrizon [31]
Robert E Kahn I hope this helps
8 0
3 years ago
Other questions:
  • Using features on demand results in saving potentially significant amounts of disk space. features on demand becomes a third ins
    14·1 answer
  • 1.Context clues can be used to determine the ________of an unfamiliar word
    5·2 answers
  • What are the first two lines of defense a company should take when addressing security risks?
    10·1 answer
  • which type of classroom enable students to attend lectures without being physically present with the teacher
    14·2 answers
  • A(n) ____ represents a particular type of object in the real world.
    7·1 answer
  • When replacing a thermostat or water pump, coolant drained from the cooling system should be ________.
    9·1 answer
  • What is the d/c b/n information rich and information poor society​
    13·1 answer
  • When typing lists in a document, you must use single-spacing between each item in the list.
    8·1 answer
  • Select all correct statements below: Group of answer choices A redundant link's switch port will be blocked by STP until needed.
    6·1 answer
  • How does your ability to correctly count change affect the impression the customer has of you?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!