0% found this document useful (0 votes)
15 views

Pseudocode practice problems

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Pseudocode practice problems

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

0478 IGCSE CS – Resource Sheet

Name: Year:
10/11
Topic: Pseudocodes Problems

1.Write a program that asks a user to enter their name and age. Display
“name you are age years old”. E.g. if Asim and 15 were entered then it
would output “Asim you are 15 years old”.

2 Write a program that lets the user enter the temperature in Celsius.
Output the temperature in Fahrenheit.

3 Write a program that asks the user to enter two numbers. Add them
together and output the result.

4 Write a program to ask the user to input a number between 1 and 12.
Output which month of the year that number is for.

5 Write a program that takes a learner’s score in a test out of 100. Decide
on the mark that a learners should achieve an A, B, C, D or U for. Output
the learner’s grade.

6 Write a program that asks the user to enter a code, output whether the
code is correct or not.

7 Write a program to ask the user to enter 3 numbers. Output which of the
numbers is the largest, and which number is the smallest.

8 Write a program that outputs the 12 times table.

9 Write a program that takes the length of two sides of a right-angled


triangle and outputs the hypotenuse.

10 Write a program to ask the user to enter a word that has between 5
and 10 characters (inclusive). Output an error if the word is not valid.

11 Write a program that asks the user to enter a number, and output the
times table for that number.

12 Write a program that asks a user to enter a number, then output that
quantity of asterisks (*).
13 Write a simple calculator where the user enters two numbers and an
operator. Output the result of the calculation.

14 Write a program to output the numbers 1.0, 1.1, 1.2, etc. from 1.0 up
to 2.0.

15 Write a countdown program that outputs the numbers 10 down to 0


and then displays “blast off”.

16 Ask a user to enter 10 numbers. Output the largest and smallest


number.

17 Ask the user to enter a number, output whether the number is odd or
even.

18 Write a program to perform a Caesar cypher on a word that is input by


the user.

19 Ask the user to enter a sentence. Output the number of characters


(excluding spaces) in the sentence, and to output the number of vowels.

20 Write a program that takes a number from the user and then increases
it by 5%. It should keep doing this until the number is more than 500.
Output the number of times the number was increased by 5%.

21 Write a program that outputs the Fibonacci sequence from 1 to 500.

22 Write a program that creates a username for a user. It consists of the


first 3 letters of the last name and the first three letters of their first name.

23 Write a program that asks the user to enter a sentence, then output
the sentence in reverse.

24 Write a program that reads 10 numbers from the user and stores them
in an array. Total and output the numbers from the array, and the average
number.

25 Ask a user to enter their date of birth in the format DD/MM/YY. Output
their date of birth in text, e.g. Your birthday is on the first of February
2000.

26 Store a set of letters in an array. Ask the user to input a letter to search
for. Output whether the letter is in the array or not.
27 Write a function that takes two numbers as input, multiplies them
together and returns the result.

28 Write a procedure that outputs the numbers 1 to 100.

29 Write a program that asks the user to enter a number. Use a procedure
to output the numbers 1 to the number entered.

30 Write a program that stores a sentence. Ask the user to enter a word.
Output whether the word input also exists in the stored sentence.

31 Write a program to play battleships. The computer should store the


positions of its ships in a 2D array. The user should guess the positions of
the ships and the program should output if they are correct or not. The
game ends when either the user has identified all the squares, or the user
has had a set number of guesses.

32 Write a multiple choice quiz program. The user should be asked 10


questions and the program should output how many they got correct.

33 Write a program that reads a number from a text file. Output all the
numbers between 1 and the number from the file.

You might also like