How do I answer these questions? 1.2.6 Explain how to use quadratic.py (PROGRAM
ID: 3748668 • Letter: H
Question
How do I answer these questions?
Explanation / Answer
As per Chegg policy we should be answering only 4 subparts if the main question has multiple parts. Request you to post others separately.
1.2.6
Can't answer since quadratic.py code is not shown
1.2.7
It prints 2.5
The numbers are added and then divided by 4. So the value of 10 / 4 is printed.
1.2.8
Assuming a = 3.14159
a. prints 3.14159
b. prints 4.14159
c. prints 2 This is because int(a) converts a to integer 3 and // performs integer division i.e without any fractional part. So the answer is an integer 8 // 3 = 2
d. prints 2.5464812403910124 since / does division with fractional portion
e. prints 2 since it prints only the integer portion of the result of 8.0/a i.e integer portion of 2.5464812403910124 which 2
1.2.9
It will cause error since sqrt() is defined in the math module, we need to use math.sqrt()
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.