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
You have a network that uses a logical ring topology. how do messages travel through the network"
RSB [31]
Messages travel from one computer to another until they will find a proper computer to whom that message is addressed.
7 0
3 years ago
(Language: Python) How can you know what value is in a variable by looking at the code?
tatuchka [14]

Answer:

B. It’s always a string that matches the variable name.

4 0
2 years ago
It's so eazy
Dmitrij [34]

Answer:

  1. true
  2. true
  3. false
  4. true
  5. true
4 0
3 years ago
Read 2 more answers
What are three steps to use to research relevant information on the internet? (Site 1)
Mademuasel [1]

Answer:

Step 1: Questioning --- Before going on the Internet, students should structure their questions. Step 2: Planning --- Students should develop a search strategy with a list of sites to investigate. Step 3: Gathering --- Students use the Web to collect and gather information.

Explanation:

there i did it for you can I get brainlyest

5 0
4 years ago
Read 2 more answers
CHALLENGE ACTIVITY 4.2.2: Basic while loop with user input. Write an expression that executes the loop while the user enters a n
tino4ka555 [31]

Answer:

#include<iostream>

using namespace std;

int main()

{

int userNum;

userNum=9;

while(userNum>=0)

{

  cout<<"Body"<<endl;

  cin>>userNum;

}

cout<<"Done"<<endl;

return 0;

}

Explanation:

  • Use the userNum >= 0 expression that executes the loop while the user enters a number greater than or equal to 0.
  • Print the userNum inside the while loop.
3 0
3 years ago
Other questions:
  • Which option is a form of an assistive technology?
    7·1 answer
  • Which option will enable Mina to apply several formats to the spreadsheet cells at the same time? A. cell content B. cell patter
    13·1 answer
  • What are operational databases
    12·1 answer
  • Write a function DrivingCost() with input parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar
    12·1 answer
  • What are three reasons teens might start drinking alcohol??
    7·2 answers
  • After pushing the power switch of the PC to the ʺonʺ position, Bob, the PC repair person, realizes that the power-on lights foun
    8·1 answer
  • Questions Presscomion
    9·1 answer
  • Which group scope can be used to assign permissions to resources only in the domain in which the group is created
    12·1 answer
  • Why do we use if statements?
    9·1 answer
  • Which of the following protocols is used by an email client to retrieve messages from an email server, giving users the option t
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!