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
DochEvi [55]
3 years ago
7

OCR Land is a theme park aimed at children and adults. Entrance tickets are sold online. An adult ticket to OCR Land costs £19.9

9, with a child ticket costing £8.99. A booking fee of £2.50 is added to all orders. One ride in OCR Land has a minimum height of 140 cm to ride alone or 120 cm to ride with an adult. Create an algorithm that: • asks the user to input the height of the rider, in centimetres • if needed, asks if they are riding with an adult • outputs whether or not they are allowed to ride • repeats this process until 8 people have been allowed to ride
Computers and Technology
1 answer:
sladkih [1.3K]3 years ago
5 0

Answer:

count = 0

while count != 8:

   height = float(input("Enter height of the rider: "))

   if height >= 140:

       print("You are allowed to ride")

       count += 1

   else:

       if height >= 120:

           answer = input("Is the rider with an adult (yes/no): ")

           if answer == "yes":

               print("You are allowed to ride")

               count += 1

           else:

               print("You are not allowed to ride")

       else:

           print("You are not allowed to ride")

Explanation:

Initialize the count as 0, it will count the number of people allowed to ride

Create a while loop that iterates while count is not equal to 8

Inside the loop, ask the user for the height. If the height is greater than or equal to 140, print "You are allowed to ride" and increment the count by 1. Otherwise, check if the height is greater than or equal to 120. If it is not, print "You are not allowed to ride". If it is, ask if the rider is with an adult or not. If it is not, print "You are not allowed to ride". If it is print "You are allowed to ride" and increment the count by 1.

You might be interested in
How do I logout of Brainly on mobile? When I went to settings, it had the option to log out but it was grayed out.
poizon [28]
Just delete the app
8 0
4 years ago
How do you take a screen shot on hp pavilion dm3
drek231 [11]
Press and hold down the "Fn" button while pressing the "Home Prt Sc" button above the numeric keypad to capture the entire screen. Make a screenshot of the active window only by holding down the "Fn" and Alt" keys while pressing "Home Prt Sc." 2. Press the "Start" button, and type "Paint" into the search box.
5 0
3 years ago
You are driving in the right lane of a municipal road the road has three lanes in your direction ahead of you in the lane to you
Mrrafil [7]
Pull Over. Do NOT Try to push the brake or try swerving with the steering wheel. Slowly pull to the side
7 0
3 years ago
Read 2 more answers
A digital artist makes an image where each pixel is represented by 9 bits - 3 for each of red, green, and blue. Which of the fol
alex41 [277]
Yup it’s A.) 000111000
4 0
3 years ago
In general, the right amount of time to do freewriting is
zlopas [31]
THE correct answer is c 10 minuets
4 0
3 years ago
Read 2 more answers
Other questions:
  • What is the definition of a WAP?
    6·2 answers
  • Which data type stores images and audio visual clips?
    9·2 answers
  • can An intelligent workplace uses technology to allow workers to be productive whether they are in the office or working from ho
    12·1 answer
  • You can send messages that include photos and videos between mobile devices using ________ technology.
    12·1 answer
  • What are factors that limit a technological design
    11·2 answers
  • If you wanted to look up an article from the Chicago Tribune the best place to start would be
    7·1 answer
  • Variable-length entities. fixed-length entities. data structures that contain up to 10 related data items. used to draw a sequen
    14·1 answer
  • You are the head of the corporate security department, and the Microsoft teamhas asked you for some assistance in setting the pa
    11·1 answer
  • How many ways do advertisers determine target audiences ??????
    15·1 answer
  • What are two potential benefits of using calendar-synchronization tools like calendly
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!