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 21
Multiple Choice
1. Match each definition with its term. -True or False
Question 22
Multiple Choice
1. Match each definition with its term. -Contains a question and other groups of statements that may or may not be executed, depending on the result of the question.
Question 23
Multiple Choice
1. Match each definition with its term. -and, or, and not
Question 24
Multiple Choice
1. Match each definition with its term. -Compares two data values.
Question 25
Essay
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. Explain, in general terms, how to modify this series of statements in such a way that you would be able to change the number of sides and try the calculation again without needing to retype all of the statements.
Question 26
Essay
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. Explain what pattern this code implements and why it is useful.