Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

Did you provide headings that offer structure to the information?

Answered: 1 week ago