Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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
This should match the output under Desired Output.# 1. Ask users to enter any number
# assign it to the variable /my_number/
# 2. Create a new variable called
# /calculation/ that is equal to
# /my_number/ plus 9
calculation = my_number+9
# 3. Multiply /calculation/ by 2
# 4. Subtract 4 from /calculation/
# 5. Divide /calculation/ by 2
# 6. Subtract /my_number/ from
# /calculation/
# 7. Print the resulting /calculation/

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions