Practical 3

*** From this week practicals will be assessed ***

Please ask one of us to mark your work after each exercise

Example code from the lectures is available here.

Exercise 1

Exercise 2

Guess my age: 27
Too high! Guess my age: 25
Too low! Guess my age: 26

Well done - that took you 3 tries.

It is probably best to start with a simple program and gradually extend it.

Exercise 3

Enter base: 6
Enter exponent: 4

6^4 = 6x6x6x6 = 1296

It is probably best to start with a simple program and gradually extend it.