Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Python Programming in Context
Quiz 2: Pthon: Estimating PI: Math and Random Methods, Selection and Boolean Expressions, the Print Function
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 1
Multiple Choice
In order to use the sqrt() function, you must use which of the following Python statements?
Question 2
Multiple Choice
Which of the following is a constant in the math module?
Question 3
Multiple Choice
What equation relates pi to the circumference of a circle?
Question 4
Multiple Choice
Case Study 1: >>> import math >>> numSides = 8 >>> innerAngleB = 360.0 / numSides >>> halfAngleA = innerAngleB / 2 >>> oneHalfSideS = math.sin(math.radians(halfAngleA) ) >>> sideS = oneHalfSideS * 2 >>> polygonCircumference = numSides * sideS >>> pi = polygonCircumference / 2 >>> pi 3.0614674589207183 -Refer to the session in the accompanying case study 1. Which line uses the math module?
Question 5
Multiple Choice
Case Study 1: >>> import math >>> numSides = 8 >>> innerAngleB = 360.0 / numSides >>> halfAngleA = innerAngleB / 2 >>> oneHalfSideS = math.sin(math.radians(halfAngleA) ) >>> sideS = oneHalfSideS * 2 >>> polygonCircumference = numSides * sideS >>> pi = polygonCircumference / 2 >>> pi 3.0614674589207183 -Refer to the session in the accompanying case study 1. How many sides does the polygon in this approximation have?
Question 6
Multiple Choice
The ____ statement is used to terminate a function.
Question 7
Multiple Choice
How many times will the following print statement be executed? >>> for sides in range(8, 100, 8) : Print(sides, archimedes(sides) )
Question 8
Multiple Choice
Case Study 2: >>> acc = 0 >>> for x in range(1, 6) : acc = acc + x >>> acc 15 -Refer to the session in the accompanying case study 2. Which of the following is the initialization statement?