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 is a header row?
777dan777 [17]

Answer:

b. the top row of a table that shows titles for the cells below

Explanation:

A header row is the first row of a given table that shows titles of the cells below it. In many cases, the header row has different styles from the other rows in the table. A header row can be found in, among others, both Microsoft's Excel and Word applications.

In the attached figure, the first row with a darker shade of background color is the header row for the table.

8 0
3 years ago
What items should you evaluate when scouting the facilities at a shooting location?
Fiesta28 [93]

I would evaluate baggage and personal belongings, rooms or closets, people's clothing, and if anyone has a weapon.

3 0
3 years ago
3. Describe what a pre-processor does in a network-based IDS tool such as Snort. Demonstrate your understanding of this function
MrRissso [65]

Answer:

Pre-processors look at organize traffic and screens parcel transmissions by examining andreassembling divided data.Frag2:preprocessor that battles against IP fracture attacks.Attackers sends a fragmentedTCP bundle with header data that gets entrance through a firewall.At the equivalent time,other parcels with vindictive information "slip" by the firewall undetected because of the fragmentationbeing so little by overwriting the header information.The frag2 pre-processor is specificallydesigned to break down bundle discontinuity to search out noxious information in the sections, which iswhy this pre-processor ought to never be turned off.Stream4:preprocessor Snort uses to coordinate assault marks over numerous packets.Anattacker endeavors to send different parcels into the system conveying parts of the attackpayload which are required to be reassembled by the host so as to start an attack.Stream4 stores the bits of the mark until all bundles are transmitted.Once they are alltransmitted, Stream4 finishes the signature and an alarm is created.

Explanation:

8 0
3 years ago
Because some countries have poor traditional telephone services, companies and consumers have resorted to Group of answer choice
maw [93]

Answer:

a. leap frogging

Question:

Because some countries have poor traditional telephone services, companies and consumers have resorted to Group of answer choices leap frogging. express package services. satellite telephones. fiber-optic telephones. voice over internet protocol (VOIP) services.

3 0
2 years ago
Is the address 7b invalid regarding cell references?
Lubov Fominskaja [6]

Answer:

It is not valid

Explanation:

I'll assume the question relates to cell referencing in Microsoft Excel.

To reference a cell in Excel, we make use of the following steps:

  • Write out the cell column name first
  • Followed by the row number

7b implies that, the row number first, followed by the column name; this doesn't follow the naming convention of cells.

Hence, 7b is invalid.

3 0
3 years ago
Other questions:
  • Which method of the form passes data without appending the parameters to the url?
    5·1 answer
  • Look up and list the number of a local taxi or car service in your community. Include the company name and telephone number.
    13·1 answer
  • So I’m doing a PowerPoint of how social media changed my life any ideas what I should right down and what kind of topics should
    11·2 answers
  • Websites that group individuals and organizations into clusters or groups based on some sort are considered to be what type of n
    11·1 answer
  • HELP ILL MARK BRAINLIETS!! What kind of statement is used to determine which path a program will take? priority statement
    8·2 answers
  • In general, the farther you are from other road users, the A. lower your crash risk B.higher your crash risk C. slower they are
    6·1 answer
  • How did the internet originate??​
    12·1 answer
  • The process of identifying and removing logical errors and runtime errors is called ..............
    5·2 answers
  • What are acenders? What are decenders?
    10·2 answers
  • Which browser feature will delete your history, cache, and cookies the moment you close the special window
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!