Pseudo code Practice Problems ------------------------------ Problem 1: Write an algorithm that gets a number from the user from 1 to 7 and prints the corresponding day of the week. We start the week with Monday 1. day = Get Day of the week from user (1 - 7) 2. if day equal to 1 then 2a. output Monday 3. otherwise if day equal to 2 then 3a. output Tuesday 4. otherwise if day equal to 3 then 4a. output Wednesday 5. otherwise if day equal to 4 then 5a. output Thursday 6. otherwise if day equal to 5 then 6a. output Friday 7. otherwise if day equal to 6 then 6a. output Saturday 8. otherwise if day equal to 7 then 8a. output Sunday 9. otherwise <- note we check for errors 9a. output That's not a day of the week Problem 2: Write an algorithm that sums all the odd numbers from 1 to N. Where N is a number from the user. Output the result 1. N = Get input from user 2. Sum = 0 3. loop from 1 up to and including N 4. CN = current number 5. if CN is not exactly divisible by 2 then 5a. Sum = Sum + CN 6. Output Sum Problem 3: Write an algorithm that takes in 2 numbers from the user. The first number will be the base and the second will be the exponent. Calculate the result of the base number to the power of the exponent and output the result. 1. B = Get the base from the user 2. E = Get the exponent from the user 3. P = 1 4. loop from 1 up to and including E 5. P = P * B 6. Output P