HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /In the analysis stage of the cinema ticket program, the manager adds a new requirement: a group of…
MediumComputer ScienceHigh School (9–10)Computer Science › Algorithms and Problem-SolvingNumericalIGCSE

In the analysis stage of the cinema ticket program, the manager adds a new requirement: a group of…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

In the analysis stage of the cinema ticket program, the manager adds a new requirement: a group of 101010 or more people gets 101010 dollars off the total. An adult ticket costs 999 dollars and a child ticket costs 555 dollars. The designer changes the pseudocode to this.

pseudocode
INPUT Adults
INPUT Children
Total ← Adults * 9 + Children * 5
IF Adults + Children >= 10
  THEN
    Total ← Total - 10
ENDIF
OUTPUT Total

Work out the output for group A, 666 adults and 555 children, and for group B, 222 adults and 333 children.

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

The program development life cycle has four stages. Analysis: identify the problem and the requirements, with abstraction and decomposition. Design: decomposition, structure diagrams, flowcharts and pseudocode. Coding: write the program code, with iterative testing. Testing: test the whole program with test data.

The worked solution

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Given. Adult 999 dollars, child 555 dollars, 101010 dollars off for 101010 or more people.

Step 1. Group A before the discount. 6×9+5×5=54+25=796 \times 9 + 5 \times 5 = 54 + 25 = 796×9+5×5=54+25=79 dollars.

Step 2. Group A, the condition. 6+5=116 + 5 = 116+5=11 people, and 11≥1011 \geq 1011≥10 is true. So the total becomes 79−10=6979 - 10 = 6979−10=69 dollars.

Step 3. Group B. 2×9+3×5=18+15=332 \times 9 + 3 \times 5 = 18 + 15 = 332×9+3×5=18+15=33 dollars. There are 555 people, and 5≥105 \geq 105≥10 is false, so there is no discount.

Answer: group A pays 696969 dollars and group B pays 333333 dollars.

Check. A group of exactly 101010 must get the discount, because the condition is >=. With >, a group of 101010 would pay the full price. A requirement like "10 or more" has to be turned into exactly the right operator.

Log in to save this for later
← All Problems
← A team is making a program that lets pupils order lunch from the school canteen before the morning…A programmer builds a program that works out a pupil's average mark from five tests… →
More onComputer Science › Algorithms and Problem-Solving

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. The program development life cyclePlanning a Program: Life Cycle, Decomposition and Flowcharts

More on this topic

  1. This is the kind of long scenario question that ends Paper 2…Hard
  2. A delivery company adds a check digit to each parcel number…Medium
  3. Name the check in each case. Say whether it is validation or verification…Easy
A bubble sort is changed so that it sorts in descending order: the comparison becomes IF…Hard
  • A shop stores the colours of the ten bicycles in its window in an array Colours: red, blue, red…Medium
  • All problems on this topic →