PSEUDOCODE
Assignment 1 - Pseudocode
Q1 Train Ticket 15 Points
Train Ticket for one person. Write a program that reads a person’s age, then computes and
displays the price the person needs to pay for the train ride according to the following rules:
Children younger than 6 years old ride for free.
If the ticket is bought at the train station:
A person over 70 years old pays $5.20
Everyone else pays $11.50.
If ticket is bought inside the train, there is an extra charge of 15% compared to train station
prices.
Note that a person’s age is within the range of 0 to 120 years. Other inputs are considered error
conditions.
Q1.1 Inputs, Outputs and Error Conditions 1.5 Points
In the space below, determine the inputs, outputs and error conditions for the problem.
Enter your answer here
Save Answer
! "
#
$
%&
0/9 Questions Answered