Professional Documents
Culture Documents
Pascal Tasks II
Pascal Tasks II
Sequence
1. Write a program to read and display the user’s personal details. Make sure you
include the following:
Ask the user his / her name, gender, age, birthday, favourite number and favourite
colour
Display the user’s details
Selection
3. Write a simple program to test someone’s username and password. The program
should include the following:
Ask the user for his / her username
Ask the user for his / her password
Test the username and password and either accept or deny the user access
(for the purposes of this program make up a username & password to test against)
4. Create a program that accepts the user’s birthday and tells them his / her star sign.
Your program should include the following steps:
Ask the user the month of his / her birth
Ask the user the day of his / her birth
Display the user’s star sign on the screen
Repetition
5. Create a program which changes the colour of the screen until the user is satisfied
with the screen colour. Make sure you include the following:
Ask the user if he / she likes the screen colour
Change the screen colour
To develop this further – change the text colour to the user’s choice.
6. Create a program which gives the user three chances to guess the name of a fairytale
character. You may choose the character whose name the user has to guess but you
must include the following:
Ask the user the name of the character
Check whether the user is correct
Re-ask the user if the answer is incorrect
If the user answers incorrectly three times, display a message that indicates that he /
she has used all his / her chances; if the user guesses correctly, display a success
message.