logo

Crowdly

Browser

Add to Chrome

What does the Python3 program below compute? Wat bereken die Python3 program h...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What does the Python3 program below compute?

Wat bereken die Python3 program hieronder?

#--------------------------------

#newton.py

import stdio

import sys

def main():

    c = float(sys.argv[1])

    t = c

    EPSILON = 1e-15

    while (abs(t - c*t**(-4)) > EPSILON*t):

        t = 0.8*t + 0.2*c*t**(-4)

    stdio.writeln(t)

if __name__ == "__main__": main()

#--------------------------------

 
More questions like this

Want instant access to all verified answers on stemlearn.sun.ac.za?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome