Graderpractice for programmers

254271 Fundamentals - Mini Test 2 (Sec 1 & 2)

Awaiting submission
Santa's elves pack gifts into big sacks. Each sack can hold 32 gifts. Write a program that calculates how many sacks will be required.

Input: a single integer representing the number of gifts

Output: the number of sacks required

Awaiting submission
Santa is wrapping gifts and he needs help with the bow and ribbon.

Input: the size s of the gift (where s is an odd integer greater than 2)

Output: a square (s dots wide) representing the gift with a vertical ribbon and a bow in the centre

Awaiting submission
On Christmas eve, Santa travels all over the world in one night (thanks to his flying reindeer). However, his memory is not so good and he often forgets where he has come from. Write a program that prints out the last 3 places that Santa has been.

Input: a list of places (one per line)

Output: the last 3 places from the list