A-level Computing 2009/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Skeleton code/2011 Exam/Section B

Section B Introduction Edit

This section will ask you questions that you will have to find programming solutions to. There will be more than one way of answering each question, so the answers below are only indicative of what we are looking for. As long as you get the same answers it doesn't matter how you do it. You may be given pseudeocode to help you program the problem.

Batting Averages Edit

Write a program to enter batting scores until the number 0 is input. And then output the total and average score.

Password Cracking Edit

Write code to keep asking for login, only accepting: username= PSN Password = easy. Otherwise it should say. “Not hacked yet”:

Christmas Trees Edit

Write code to print out a Christmas tree of a user defined size: even rows = *, odd = #. For example for the number 4 it should output: