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
olganol [36]
3 years ago
8

Write a script which: Uses the input function to get any number and store it in a variable named my_number Create a new variable

named calculation which equals my_number plus 9 Multiply calculation by 2 Subtract 4 from calculation Divide calculation by 2 Subtract my_number from calculation Print calculation
Computers and Technology
1 answer:
WINSTONCH [101]3 years ago
7 0
<h3><u>Answer:</u></h3>

# Using the input function

# Prompt the user to input some number

# Convert the input to a float - this will cater for both floating

# numbers and integers

# Store the result in a variable called my_number

my_number = float(input('Please enter some number '))

#Create a variable named calculation which equals my_number plus 9

calculation = my_number + 9

#Multiply calculation by 2

calculation *= 2

#Subtract 4 from calculation

calculation -= 4

#Divide calculation by 2

calculation /= 2

#Subtract my_number from calculation

calculation -= my_number

#Print calculation

print('calculation = ' + str(calculation))

<h2><u>Sample Output</u></h2>

>> Please enter some number 8

calculation = 7.0

<h2><u>Explanation:</u></h2>

The above program has been written in Python and it contains comments explaining each line of the code. Please go through the comments. A sample output has also been provided.

You might be interested in
What are the names of each devices pleaseee​
nignag [31]

Answer:

the answer is computer, phone, laptop

Explanation: that is all ik

3 0
2 years ago
Read 2 more answers
The 16 broad career options developed by the US department of education are called
In-s [12.5K]
The answer is career clusters. 
6 0
3 years ago
Derek has an interest in designing video games. What requirements should he fulfill to be a game designer? To be a game designer
4vir4ik [10]

Answer:

2. Marketing, communication or advertising

Explanation:

5 0
3 years ago
Elliott is trying to normalize a database that he has designed. Which is not one of the elements of 1NF or 2NF?
Kruka [31]
D. each table must depend on the entire foreing key
4 0
1 year ago
Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. What critical detail must she ha
Charra [1.4K]

Answer: A. target audience for the brochure.

Before even starting the design of the brochure, Amanda needs to get information on who the target audience are going to be. Amanda will need to conduct a quick research on what the audience of their community likes and does not like. By understanding the target audience, Amanda will be able to get an idea of what design, colors, and format she would make that will attract the attention of their audience.

5 0
2 years ago
Other questions:
  • 5 things that i learned about internet safty
    8·2 answers
  • Warning or pop-up that convinces a user that his or her computer or mobile device is infected with a virus or other problem that
    10·1 answer
  • Which step of the design process is the company currently engaged
    15·1 answer
  • NAND is logically complete. Use only NAND gates to constructgate-level circuits that compute the
    7·1 answer
  • 120
    14·1 answer
  • A network administrator notices that some newly installed Ethernet cabling is carrying corrupt and distorted data signals. The n
    5·1 answer
  • Which orientation style has more height than width?
    11·1 answer
  • Question 1 (3 points)
    6·2 answers
  • Which statement is true?
    13·2 answers
  • What is white light?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!