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
Give some examples of CyberCrime
iris [78.8K]
I think you should take a look into this link: https://www.wired.com/2009/12/ye-cybercrimes/
Here are the 10 most <span>destructive cybercrimes that you can take as areal example of cybercrime.</span>
6 0
3 years ago
Which is technologically backward country? Options United States U K CHILE INDIA
agasfer [191]
The answer is India.

There are a lot of factors affecting India in becoming backward in technology competitiveness. 
One factor is producing or exporting lots of engineers to other countries leaving average skills in the country. Second, poor government institutes. Next, problems with budget allocations. 
3 0
3 years ago
You are going to buy a computer, but first you want to do some research to help you select the best model for your need. Where s
Kisachek [45]
The answer to this question is c
6 0
3 years ago
Read 2 more answers
You are setting up a small network. The customer has decided to change his internet service provider (ISP) to EtherSpeed. The IS
salantis [7]

Home pc1 becouse it is the right one

3 0
3 years ago
What list did poe appear on for the search engine lycos?
HACTEHA [7]
What list did Poe appear on for the search engine Lycos"
Millines most wanted number four. Edgar Allan Poe was born on January 19, 1809, in Boston, Massachusetts. His father, named David Poe Jr and his mother, named Elizabeth Arnold Hopkins Poe, were touring actors. 
4 0
3 years ago
Other questions:
  • What three steps Name a group??
    14·1 answer
  • What do the letters of the su command stand for? what can you do with su besides give yourself root privileges? "what can you do
    5·1 answer
  • Working at a ski resort in the mountains has its own unique security issues. Kenny is the chief information officer for Sundance
    10·1 answer
  • Which field of study would be most useful for a person who wants to work in a recycling plant?
    12·2 answers
  • The Internet may best be compared to a/an
    11·1 answer
  • Giving Brainliest IFFF CORRECT
    9·1 answer
  • <img src="https://tex.z-dn.net/?f=6.372%20%5Ctimes%2075%20find%20the%20product" id="TexFormula1" title="6.372 \times 75 find the
    6·1 answer
  • You are planning a program to find the maximum heart rate recommended for patrons of a gym where you have a part-time job. One f
    13·1 answer
  • Consider the following correct implementation of the selection sort algorithm.
    5·1 answer
  • T/F static development is the process of constructing the programs and code modules that serve as the building blocks of the inf
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!