Answered step by step
Verified Expert Solution
Question
1 Approved Answer
9. (10 points) Write a function print Divisors that, given a positive integer n, prints all the divisors of n (including 1 and n). Print
9. (10 points) Write a function print Divisors that, given a positive integer n, prints all the divisors of n (including 1 and n). Print the divisors on a single line. Sample runs: >>> printDivisors (6) 1 2 3 6 >>> printDivisors (12) 1 2 3 4 6 12 >>> printDivisors (13) 1 13 >>> printDivisors (784) 1 2 4 7 8 14 16 28 49 56 98 112 196 392 784 10. (10 points) Write a function flipcase that accepts a word (str) as an argument and returns the same word but with the case of each letter flipped. That is, upper case letters are switched to lower case, and lower case letters are switched to upper case. Sample runs: >>> flipcase ('Hello'). 'hELLOT >>> flipcase ('HeLLo') 'hello' >>> flipcase ('Wow') 'WOW' >>> flipcase ('Apple') 'apple
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started