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
Select the correct statement(s) regarding direct sequence spread spectrum (DSSS) and orthogonal frequency division multiplexing
Arada [10]

Answer:

a. OFDM is not classified as a spread spectrum technique, although OFDM has the effect of spreading the signal over a larger frequency spectrum.

Explanation:

Orthogonal Frequency Division Multiplexing is a technique in which large digital data is sent over radio waves by splitting it into multiple subcarriers. The data is then transmitted to different users who can access the files. OFDM is not a spread spectrum technique, it is based on large frequency spectrum.

6 0
3 years ago
HURRY PLEASE
Vika [28.1K]

Answer:

import random

Explanation:

Using the random module in python you could generate a random number.

7 0
3 years ago
Read 2 more answers
Marys total out of pocket costbwere for the year​
aleksandrvk [35]
For the year or for the month?
3 0
4 years ago
Which best describes the differences between a resume and a CV?
andriy [413]
As stated, three major differences between CVs and resumes are the length, the purpose and the layout. A resume is a brief summary of your skills and experience over one or two pages, a CV is more detailed and can stretch well beyond two pages
7 0
3 years ago
Read 2 more answers
Internal monitoring is accomplished by inventorying network devices and channels, IT infrastructure and applications, and inform
gtnhenbr [62]

Answer:

True

Explanation:

It is TRUE that Internal monitoring is accomplished by inventorying network devices and channels, IT infrastructure and applications, and information security infrastructure elements.

The above statement is true because Internal Monitoring is a term used in defining the process of creating and disseminating the current situation of the organization’s networks, information systems, and information security defenses.

The process of Internal Monitoring involved recording and informing the company's personnel from top to bottom on the issue relating to the company's security, specifically on issues about system parts that deal with the external network.

5 0
3 years ago
Other questions:
  • the ____ presents information about the document, the progress of current tasks, and the status of certain commands and keys.​
    14·1 answer
  • Say you find a module in a package that does a lot of awesomely useful things, but the name of it is module_that_does_many_aweso
    12·1 answer
  • Life Decisions Cyber Cafe is a cafe with free Internet service and computers that are linked to various online career opportunit
    15·1 answer
  • The valence electron configurations of several atoms are shown. how many bonds can each atom make without hybridization? 2s^2 2p
    12·1 answer
  • A domain's ____ settings must be configured correctly so that the mail transfer agent (mta) can establish a connection with a re
    15·1 answer
  • Answer to this problem
    11·1 answer
  • Write a program in Java to input a letter. If it is an uppercase letter then
    7·1 answer
  • How many are required for an accurate signal?
    13·1 answer
  • Try my game? https://scratch.mit.edu/projects/589314237
    13·2 answers
  • Which communication technology often takes the place of printed interoffice communication?.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!