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

=Section B Introduction= 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
Write a program to enter batting scores until the number -1 is input. And then output the total and average score.

Mirayde's One

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

Christmas Trees
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: