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
Alenkasestr [34]
3 years ago
12

Modify your previous exercise to determine if the user can ride a rollercoaster. To ride the rollercoaster, you must be at least

42 inches tall. You must also be at least 9 years old. Ask the user how tall and how old they are. Use ONE if-else to determine if the user can ride the rollercoaster. Note how much cleaner this is and how much less repetition this method has.
Computers and Technology
1 answer:
sweet-ann [11.9K]3 years ago
4 0

Answer:

In Python:

age = int(input("How old are you? "))

height = float(input("How tall are you (inches)? "))

if age>=9 and height >= 42:

    print("You can ride the roller coaster")

else:

    print("You ca'nt ride the roller coaster")

Explanation:

The code segment of the "previous exercise" is not given; so, I rewrite the program from scratch using python.

And using the solution I provided, you'll have an idea of how to write the expected code If the "previous exercise" is not written in python,

This line prompts user for age

age = int(input("How old are you? "))

This line prompts user for height

height = float(input("How tall are you (inches)? "))

This checks if user is at least 9 years old and at least 42 inches tall

if age>=9 and height >= 42:

If true, the user gets to ride the roller coaster

    print("You can ride the roller coaster")

else:

If otherwise, the user will not ride the roller coaster

    print("You ca'nt ride the roller coaster")

You might be interested in
1. Digital videos look sharpest when they are displayed at a resolution that is larger than the frame size.
boyakko [2]

Answer:

(d) all of the above

Explanation:

This is because, not only is digital video a core technology for digital television, it also happens to be a core technology for video conferencing and video messaging. This could be seen in its application in messaging apps for private discussion of for holding official meetings between employees in virtual conference.

8 0
2 years ago
How is kerning used in Word?
kirill115 [55]

Answer: To adjust the spacing between characters that make up a word

Explanation: Kerning refers to the way spacing between two specific characters is adjusted. The idea is to give a better looking result by reducing the spacing between characters that fit together nicely (such as "A" and "V") and increasing the spacing between characters that don't. Select the text that you want to change.

4 0
2 years ago
Which of the following is an example of intellectual property?
Gnesinka [82]

Answer:

B. Programming code for a video game

Explanation:

An item is considered an intellectual property if it is intangible in the sense that the actual property cannot be touched and it does not have a physical presence.

Options A, C and D do not fall in this category because they are tangible and they have physical presence.

Only option A, programming source code does not fall into this category.

Hence, <em>B. Programming code for a video game </em> answers the question

8 0
2 years ago
One way to make a data table stand out on the screen and help bring the viewer’s attention to it is to add a shadow behind the t
olganol [36]
A user can add a shadow to a table on Power Point presentation, b<span>y choosing the Layout tab under Table Tools, clicking on Effects, and selecting Shadow. The shadow can be inner, outer or perspective. The most commonly used is outer shadow.
</span>Adding a shadow behind the table will make the <span>data table to stand out on the screen and help bring the viewer’s attention.
Shades can be added also on text, tables, pictures inserted in the presentation and other object. </span>
7 0
3 years ago
Read 2 more answers
Most simple computer programs follow the basic pattern defined by the acronym IPO. What does IPO mean with regards to programmin
Art [367]

Answer:

IPO means Input - Process - Output

Explanation:

The IPO model means that a computer program is given an input to process, it processes the given input and return an output as the result.

3 0
3 years ago
Other questions:
  • Which of the following is a valid call for the generic method declared below? and why?
    9·2 answers
  • You save $500 in a retirement account at age 25. it increases an average of 10% per year until you are 65. which formula and res
    13·1 answer
  • When Clara accesses the programs and documents on her computer by way of icons, she is said to be employing
    15·1 answer
  • What should a password policy contain to reduce a hackers ability to crack the passwords?
    10·1 answer
  • How can websites illustrate cooperation and kindness?
    8·2 answers
  • 1)When the liquid is spun rapidly, the denser particles are forced to the bottom and the lighter particles stay at the top. This
    10·1 answer
  • Which of the following statements are true of
    14·1 answer
  • Have you ever been told sensitive or confidential information that made you uncomfortable? How did you deal with the situation?
    8·1 answer
  • It refers to the story or events in which the film revolves.
    13·1 answer
  • Which item can be added to Outlook messages, like a Word document or PowerPoint presentation, that takes standard bulleted lists
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!