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

Create a Python script that enables a user to enter an integer number into the Python console and stores such integer number int

o a variable named input1. Use an if statement to print the following output per the following conditions:If integer is a negative number, print in console "Input1 integer is negative"If integer is zero, print in console "Input 1 integer is zero"If integer is a positive number less or equal than 30, print in console "Input 1 is positive but less or equal than 30.If integer is a positive number greater than 30, print in console "Input1 is positive and greater than 30"

Computers and Technology
1 answer:
DIA [1.3K]3 years ago
6 0

Answer:

Here is the Python program:

input1 = int(input("Enter an integer: ")) #prompts user to enter an integer

if(input1<0): #if input value is negative

    print("Input1 integer is negative")

elif(input1==0): #if input value is 0

    print("Input 1 integer is zero")

elif(input1<=30): #if input value is less than or equal to 30

    print("Input 1 is positive but less or equal than 30")

else: #if input value is greater than 30

    print("Input 1 is positive and greater than 30")    

Explanation:

I will explain the program with an example

Lets say user enters 16 as input So

input1 = 60

Now the first if condition if(input1<0): is false because 60 is not less than 0

The second elif (else if) condition elif(input1==0): also evaluates to false because 60 is not equals to 0

The third elif condition elif(input1<=30): evaluates to false because the input value is 60 which is not less than or equal to 30.

The fourth else part executes because all the above if elif conditions evaluate to false which means the input number if neither negative, nor 0 and not less than or equal to 30. Hence the input number is greater than 30 and this is true as 60 is greater than 60. So the print statement executes which is:

    print("Input 1 is positive and greater than 30")

The message in the above print statement is printed on the output screen.

The screenshot of the program along with its output is attached.

You might be interested in
Using a pin or password in addition to tpm is an example of what type of authentication?
anzhelika [568]
Considering it is private i would say security?
3 0
3 years ago
Describe the function of the user account section of the control panel
cluponka [151]
From Google:

"User Account Control<span> or </span>UAC<span> for short is a security feature of Windows which helps prevent unauthorized changes to the operating system. These changes can be initiated by applications, users, viruses or other forms of malware."</span>
6 0
3 years ago
#Electrical Engineering
GrogVix [38]

Answer:

yes

Explanation:

where's our question

5 0
3 years ago
Digital Subscriber Line (DSL) is a way for traditional telephone companies to provide Internet access a way for traditional cabl
zvonat [6]

Answer:

Option A is correct

Digital Subscriber line is a way where telephone companies provide internet access for connection.

It is a communication medium used to transfer digital signals. DSL is one of the most popular broadband internet access.

Explanation:

DSL stands for Digital Subscriber Line. DSL works with high-speed bandwidth that connects from a phone jack to a telephone network. DSL works within frequencies. You can use the DSL while making phone calls.

6 0
3 years ago
Read 2 more answers
What is a gamer?
mixer [17]

Answer:

It is <em>definitely </em>D.

Explanation:

I am a gamer myself so this question is easy for me. It's slim to none to be wrong when you view my answer!!!

7 0
2 years ago
Other questions:
  • WILL MARK BRAILIEST IF ANSWERED FAST!!!
    8·1 answer
  • Which graphic design tool allows you to lay images on top of one another? A. Layers B. Selection C. Drawing D. Color
    10·2 answers
  • Radiation requires a heated liquid to transfer energy. Please select the best answer from the choices provided T F
    10·2 answers
  • Ports on the motherboard can be disabled or enabled in ____ setup. RAM Firmware Northbridge BIOS
    8·1 answer
  • Which of the following statement about CAD is NOT true A. It increase the productivity of designers B. It uses computer graphics
    8·1 answer
  • HIPAA requires the following controls for medical records: A. Encryption of all data B. Technical safeguards C. Physical control
    12·1 answer
  • I can't find the errors! Could anyone help me please?!
    5·1 answer
  • landon starts his computer and gets message, hard drive is not found. He was watching a movie the previous night, what might the
    6·1 answer
  • A business letter is not written:
    6·1 answer
  • Alexa it is olewi.............................................
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!