Question 1 (2/4) Given the following Python code program fragment: a = 7 b = 4 X = 3.0 y = 1.5 sum = 0.0 c= a/b+y d = (a % b) - (b % a) z = x / / b +...
View the step-by-step solution to:

Question

# hello, could one possibly assist with these. thanks!   Attachment 1 Attachment 2 Attachment 3 ATTACHMENT PREVIEW Download attachment Annotation 2019-11-01 102935.jpg Question 1 (2/4) Given the following Python code program fragment: a = 7 b = 4 X = 3.0 y = 1.5 sum = 0.0 c= a/b+y d = (a % b) - (b % a) z = x / / b + b // a sum = a + b + x + y sum = sum + a What are the final values of c, d, z and sum? ATTACHMENT PREVIEW Download attachment Annotation 2019-11-01 103006.jpg Question 4 (1/2) Write a formatted print statement that prints the value of an integer variable n in a width of 12 with a comma as the thousands separator. ATTACHMENT PREVIEW Download attachment Annotation 2019-11-01 103202.jpg Question 9 (8/ 9) Write a while loop that counts the number of positive and negative integers that are evenly divisible by 5 entered by a user. The loop should stop executing and print the resulting counts when the user enters either 0 or a value not evenly divisible by 5. Example: Enter first value: Q Enter next value: ﬂ Enter next value: Q Negatives: 1 Positives: 1

Question 9 SOURCE CODE p=0 ne=0 n = int(input("Enter first value: ")) while n % 5 == 0: if (n &gt;= 0): p=p+1... View the full answer P=0
ne=0
3
n = int(input(&quot;Enter first value: &quot;) )
1- while n % 5 == 0:
5 7
if (n &gt;= 0):
P=p+1
else:
8
ne=ne+1
9
n = int(input(&quot;Enter next value: &quot;) )
10
11
12
print( '...

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents