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
What are the main dimensions of information systems
anastassius [24]

\huge\mathcal\colorbox{yellow}{{\color{blue}{AnSwEr~↓~↓~}}}

There are three dimensions of information systems

  • organizational
  • management
  • technology.

\huge \colorbox{blue}{hope \: it \: help \: u}

8 0
3 years ago
Total_coins = 0
Maslowich

The code statement that completes the program is total_coins = nickel_count + dime_count

<h3>How to complete the segment?</h3>

From the code segment, we have the following highlights:

  • total_coins is initialized to 0, at line 1
  • Inputs for nickel_count and dime_count are taken on lines 2 and 3
  • The last line prints total_coins

The above means that total_coins has not been calculated.

This is calculated using:

total_coins = nickel_count + dime_count

The above must be placed before the last line of the program

Read more about code segments at:

brainly.com/question/24833629

#SPJ1

<h3>Complete question</h3>

Complete the code segment to calculate the total number of coins

total_coins = 0

nickel_count = int(input())

dime_count = int(input())

print(total_coins)

8 0
2 years ago
Memes are life dont delete if u do then u know im right
soldier1979 [14.2K]

Answer:

oof  ur right

Explanation:

4 0
3 years ago
Read 2 more answers
DO NOT JOIN ANY Z O O M MEETINGS FROM THIS PERSON! IS A TRAP Please help me get them banned!!!!!
s2008m [1.1K]

Answer:

how do i help?

Explanation:

7 0
3 years ago
Read 2 more answers
In order to use Slicers to filter some data, what must you first do to that data?
Vinil7 [7]

Answer:

Select Insert > Slicer. Select the fields you'd like to filter. Select OK and adjust your slicer preferences, such as Columns, under Options. To select more than one item, hold Ctrl, and then select the items that you want to show.

Explanation: Convert the data into a table

4 0
4 years ago
Read 2 more answers
Other questions:
  • Calculate the shear stress (lbf/in^2) for a given normal stress (lbf/in^2) that is applied to a material with a given cohesion (
    15·1 answer
  • Using the SUM function allows a series of numbers to be 1. Multiplied 2. Subtracted 3 Added 4. Divided
    11·1 answer
  • Guidelines:
    6·1 answer
  • DESCRIBE FLOPPY DISK
    15·1 answer
  • A7DF is the hexadecimal representation for what bit pattern?
    8·1 answer
  • One day you tap your smartphone screen to turn it on, and nothing happens. It appears to be turned off and will not turn on. Wha
    12·2 answers
  • How would you use Microsoft Excel to
    10·2 answers
  • Identify the symbol. please help!!<br>​
    7·2 answers
  • 4. Write technical term for the following statements
    15·2 answers
  • Which company provides a crowdsourcing platform for corporate research and development?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!