Problem set #7 -- due Monday 3/13 1. [Chapter 5 problem 9 (pages 96-97)] Assume we want to print a strong warning message if a pH value is below 3.0 and otherwise simply report on the acidity. We try this if statement: >>> ph = 2 >>> if ph < 7.0: ... print(ph, "is acidic.") ... elif ph < 3.0: ... print(ph, "is VERY acidic! Be careful.") ... 2 is acidic. This prints the wrong message when a pH of 2 is entered. What is the problem, and how can you fix it? [Note that the print function also allows multiple parameters, which are simply printed on the same line with a space in between. That's why it is not necessary to use str(ph) here.] 2. Modify our firstprimes method discussed in class (included below) to print out all the prime numbers less than or equal to the input parameter, num. def firstprimes(num): """Prints out the first num primes""" count = 0 # the number of primes we've printed out current = 1 # the current number we're checking while count < num: if isprime(current): print(current) count += 1 current += 1