Write a function called convert_grade(numeric_grade)
,
which takes an integer in the range (0,5). Your function
should print the letter grade the user recieved, given the numeric grade:
Numeric Grade | Letter Grade |
---|---|
0 | F |
1 | D |
2 | C |
3 | B |
4 | A |
>>> convert_grade(0) F >>> convert_grade(1) D >>> convert_grade(4) A
Write a function called print_factors(x)
, which prints
all of the positive integer factors of x. An integer y is an integer
factor of x if the remainder of xy is 0.
>>> print_factors(1) 1 >>> print_factors(2) 1 2 >>> print_factors(4) 1 2 4
In a file called blurred_images.py write a function
called simple_blur(a_picture)
. This function should
display a blurred version of the image parameter.
To blur an image, you simply average a pixels color value with the 4 pixels surrounding it.
Note: This image has actually been blurred 4 times, to make it obvious what is happening. Your image will only be slightly fuzzy.