Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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?

1.2.6 Explain how to use quadratic.py (PROGRAM 1.2.4) to find the square root of a number 1.2.7 What does stdio.writeln ((1.0+23 4) /4) write? 1.2.8 Suppose that a is 3.14159. What do each of these statements write? a. stdio.writeln(a) b. stdio.writeln(a 1.0) c. stdio.writeln(8// int(a)) d. stdio.writeln(8.0 a) e. stdio.writeln(int (8.0 a)) Explain each outcome. 1.2.9 Describe the effect of writing sqrt instead of math. sqrt in PROGRAM 1.2.4. 1.2.10 Does (math.sqrt (2) * math.sqrt(2)2) evaluate to True or False? 1.2.11 Compose a program that takes two positive integers as command-line ar- guments and writes True if either evenly divides the other. 1.2.12 Compose a program that takes three positive integers as command-line arguments and writes False if any one of them is greater than or equal to the sum of the other two and True otherwise. (Note: This computation tests whether the three numbers could be the lengths of the sides of some triangle.) 1.2.13 Give the value of a after the execution of each of the following sequences: a True a-not a a not a a not a a=2 a=a*a a a +a a=a+a a a* a 1.2.14 A physics student gets unexpected results when using the code force G massi mass2/ radius radius

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()

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote