Question: Please answer all parts using Python. Thank you! For these next two parts, you may Part 1 Write an if statement that checks if x

 Please answer all parts using Python. Thank you! For these next

Please answer all parts using Python. Thank you! For these next two parts, you may Part 1 Write an if statement that checks if x is a multiple of y. Assume x and y already exist. Part 2 Write an if statement that checks if either x or y is even, and the other one is odd. Assume x and y exist. Part 3 Convert the following while loop into a for loop. while i> 0 print("!) i.= 1 Part 4 what is wrong with this loop? while i 10: print(i) Part 5 What is wrong with this loop? while i "h, # "One two!" -> "o, # "a" def eachChar(str): l, e, l, e, n, o" t, w, o, !" Part 8Write a new function called sumOfThrees (n), which returus the sum of first n positive integers that are divisible by 3. If n is less than or equal to 0, return 0. IIn 3 will return the integer 18 because 3 6 9 // n 5 will return the integer 45 because 3 + 6 + 9 + 12 + 15 45 // n -1 will return def sumOfThrees (n): 18

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!