Uploaded by Muhammad Kamran

PF-V2-Quiz-02-Version-01-Solution

advertisement
Programming Fundamentals (V2) -- Quiz 02.
Semester: Fall 2021 / Instructor: S M Irteza
Name: SOLUTION
Date: 2021-12-06
Roll Number:
Total Marks: 15 (3m + 3m + 3m + 6m)
Time Allowed: 10 minutes
Marks Obtained:
1. What is the expected value of y after this Python statement: y = 25 % (2 + 5) + 13
a. 16.5714
b. 19
c. 5
d. 17
2. What is the expected value of z after this Python statement: z = 18 % 6 ** 2
a. 6
b. 0
c. 18
d. 9
3. What is the expected value of x after this Python statement: x = 5 ** 3 // 3 + 15
a. 56.66667
b. 6
c. 20
d. 56
4. Develop a flowchart that illustrates a solution to the following problem:
a. We want to calculate the pay of a worker, based on his or her role and hours worked. If his
role is “fulltime”, he or she gets paid 30,000 rupees plus 15 rupees per hour worked. If his
or her role is “parttime”, he or she gets paid 25 rupees per hour. Output the pay that is due
to this worker.
Download