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
Jeff has created a table to calculate the cost of raw materials that he purchases monthly. Cell A2 shows the fixed cost of the r
Luda [366]
=A2*D2
The above formula will allow calculation  of monthly cost of the first raw material.This is done by Multiplying the contents of cell A2 (Column A, Row 2) and cell D2 (Column D, Row 2). Here Cell A2 contains cost of the first raw material and Cell D2 contains number of units of the raw material produced  each month. After finding the monthly cost of the first raw material in this way, the monthly cost of other raw materials can simply be calculated by dragging down the formula to apply to the rows below.
3 0
3 years ago
Read 2 more answers
What type of device is characteristic of an enterprise environment? Question 14 options: a) A workstation used by a retired pers
sertanlavr [38]

Answer:

A workstation used at an engineering firm is characteristic of an enterprise environment.

4 0
3 years ago
Which type of password provides the highest level of permissions in bios?
OLEGan [10]
<span>Which type of password provides the highest level of permissions in bios? = Supervisor provides the highest level of permissions in the BIOS</span>
6 0
3 years ago
Which statement is true for slide or positive film?
Hitman42 [59]

Answer:

B.

Slides or positive films give high quality pictures with higher color saturation and contrast.

Explanation:

The above is true for slides with positive film. This is because, the positive film happens to have a high resolution when it was been used thereby giving out a high quality video at the end of the recording. The higher colour saturation and contrast are also an attribute of a slide  or positive film.

6 0
3 years ago
Save an image as a separate file by right-clicking the image and then clicking this option at the
Olenka [21]

Answer:

Save image as

Explanation:

6 0
2 years ago
Read 2 more answers
Other questions:
  • Demonstrate your grasp of the Unix file system by constructing a directory structure as follows: In your home ( ~ ) directory, c
    11·1 answer
  • Schools are businesses that need to install software on a large number of computers can usually obtain a ______
    13·1 answer
  • If Johanna wants to label the x- and y-axes in Excel she should click Layout, then what?
    12·1 answer
  • Which term is used to describe a password-protected, encrypted data file that verifies the identity of the sender of a message?
    8·1 answer
  • Which system tool allows you to manage the available space on your hard disk to improve efficiency? A. ScanDisk B. Anti-Virus C.
    10·1 answer
  • Write an Enlistee class that keeps data attributes for the following pieces of information: • Enlistee name • Enlistee number Ne
    7·1 answer
  • State all the generations of computers.
    10·2 answers
  • Write the algorithm and draw a flowchart to display the greatest number among any two different numbers....
    5·1 answer
  • which of the following is the most appropriate way to write css style for the font family property in html
    8·1 answer
  • Difference between copy command and cut command
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!