top of page

PROGRAMMING CHALLENGES

Train Ticket Price Calculator

Difficulty:

2 Medium

2.2 Practice Exam Questions

Topic:

FastTrack is a train service. Write a program that allows the user to enter the number of stations they will travel through and the number of passengers. Calculate the total fare, which is �10 per station per passenger. If the trip is during peak hours, add a 20% surcharge.

Use if statements and basic arithmetic for fare calculation.

Need help with your programming skills?

If you need more help than just independent practise, then we're here for you. Book a 1:1 with us and we will be able to guide you to becoming a proficient programmer who can tackle any of the challenges an exam board can throw at you.

bottom of page