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]
4 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]4 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
Look at the simple circuit illustrated in the figure above. What will happen when only switch S1 is closed?
Tema [17]
If only S1 is closed, due to the diode across S3 is pointing to the right, the current cannot be flowing to the left.

So nothing will happen, the bulb is not on.
6 0
3 years ago
Read 2 more answers
Security attacks are classified as either passive or aggressive. True or false
kogti [31]

Answer:

false is the answer okkkkkkkkkkkkkkkk

3 0
3 years ago
17. Write a SELECT query for the palateE4 database that produces a result grid listing paintName, and a count of the occurrences
GaryK [48]

Answer:

SELECT paintname, COUNT(paintname) as count_paintname

FROM paint

GROUP BY paintname HAVING COUNT(paintname) > 2

ORDER BY paintname

Explanation:

The structured query language or SQL statement returns two columns of paintname and the count of the distinct paint names in the paint table with rows of grouped paint names greater than two and in the ascending order of the names.

4 0
3 years ago
Which of the following statements about ip addresses is true?
Greeley [361]

This question is incomplete because it is lacking the necessary answer options, which I have provided below:

A. When data is sent between devices on the Internet, they identify each other with an IP address.

B. When a user signs up for an email address they must also sign up for an IP address.

C. IP addresses are assigned at the factory.

D. The IPV4 IP scheme allows for an unlimited number of devices to connect to the Internet.

So, given your question, the answer option which is true about IP addresses is: A. When data is sent between devices on the Internet, they identify each other with an IP address.

An IP address is an abbreviation for Internet protocol address and it can be defined as a unique number assigned to a computing device or other network devices, in order to differentiate each computing device from one another in an active network system.

Hence, an IP address is typically designed and developed to uniquely identify each computing device or network devices connected to the Internet or an active network system.

Basically, IP addresses are used anytime two or more computing devices send and receive data from one another over the Internet.

In conclusion, interconnected computing devices identify each other with an IP address when sending and receiving data over the Internet.

Read more: brainly.com/question/20629962

5 0
3 years ago
A total of 378 tickets were sold for the school play. They were either adult tickets or student tickets. There were 72 fewer stu
Dima020 [189]

Since there were 72 fewer students tickets sold than adults tickets. the number of adult tickets that were sold is 278.

<h3>What is this algebra about?</h3>

Note that:

A total of 378 tickets were sold for the school play.

So:

A + S = 378

S = 2A

A + (2A) = 378

3A = 378

A = 126

If A is 126, then S is double of that, or 252.

126 + 252 = 278

Therefore, Since there were 72 fewer students tickets sold than adults tickets. the number of adult tickets that were sold is 278.

Learn more about tickets from

brainly.com/question/13520667

#SPJ1

7 0
1 year ago
Other questions:
  • Why are video texts an example of multimedia? A. They use audio and visual elements together. B. They use one type of medium to
    13·2 answers
  • _____ was just a sophomore when he began building computers in his dorm room at the University of Texas. His firm would one day
    14·1 answer
  • (TCO 4) What will the following program segment display? int funny = 7, serious = 15; funny = serious % 2; if (funny != 1) { fun
    14·2 answers
  • 100POINTS!!!!
    9·2 answers
  • Which of these tools can best be used as a self assessment for career planning purposes?
    6·2 answers
  • Hurry i need help What would provide structured content that would indicate what the code is describing ?
    12·1 answer
  • Name the three major functions performed by the computer.
    6·1 answer
  • What is the difference between a computer’s RAM and its hard disk?
    13·2 answers
  • Treating others with respect, even when they're impolite, is considered
    13·1 answer
  • Write a short program that asks the user to enter a month &amp; prints a message based on the month
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!