PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You are writing an application that uses the sqrt function. The program must reference the function using the name squareRoot.

You need to import the function.

Which code segment should you use?

A. import math.sqrt as squareRoot
B. import sqrt from math as squareRoot

C. from math import sqrt as squareRoot

D. from math.sqrt as squareRoot

References: https://infohost.nmt.edu/tcc/help/pubs/python/web/import-statement.html


Leave a Reply