blob: 7adef4a71592c9da71a06d7c7d170cfc01a2c70e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
Challenge 1: "Write a script that computes the first five perfect
numbers. A perfect number is an integer that is the sum of its positive
proper divisors (all divisors except itself). Please check Wiki for
more information. First 4 are 6, 28, 496 and 8128"
My notes: Cute little problem, let's have a go.
Challenge 2: "Write a function, center, whose argument is a list of
strings, which will be lines of text. The function should insert spaces
at the beginning of the lines of text so that if they were printed,
the text would be centered, and return the modified lines."
My notes:
Another well-specified problem:-)
|