Graderpractice for programmers

254271 Fundamentals - Mini Test 2 (Sec 3 & 4)

Awaiting submission
Santa's elves pack gifts into big sacks. Each sack can hold 10 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 8<.

Input: the width w and the height h of the gift (where w/h are integers greater than 3)

Output: a rectangle (w by h) representing the gift with a bow at position (2,2) and (3,2)

Awaiting submission
On Christmas eve, Santa travels all over the world in one night. His flying reindeer keep a list of all places to visit. They stop at one place in the middle of the journey for a quick rest.

Input: a list of places (one per line, maximum 100 places)

Output: the place in the middle of the journey (if the journey is an even number of places then take the earlier place)