Study Guide
Chapter 5
Part 1: Evaluate:
1. round(5) = 5
2. round(5.55) = 6
3. round(7.32) = 7
4. int(7.77) = 7
5. int(8.99) = 8
6. float(55) = 55.00
7. float(1000) = 1000.00
Part 2: Questions:
What is an integer division?
What is a mod division?
Evaluate:
What is a random number and what is the syntax needed to import it.
True/False: Loops can be used with random numbers.
What is the difference between round, int function, and float?
What is the syntax for round?
What is the syntax for int function?
What is the syntax for float?
float()
How do we round numbers in decimal places and what is the syntax?
Process rounds the value in x to y decimal places
r=round(x,y)
What is the import for the math class?
From math import*
There are many different types of methods for the math class. What is a brief example of the syntax for each one and what do each do. (Understand their meanings)
Here are some methods
y= sqrt(x)
returns square root
y=pow(a,b)
raises a to the b power
y=isnan(x)
returns true if x is not a number and false if it is
y=radians(x)
converts degrees to radians
y=degrees(x) converts radians to degrees
Trig functions
y=sin(x)
returns the sine if x is in radians
y=cos(x)
returns the cosine if x is in radians
y=tan(x)
returns the tangent if x is in radians
y=asin(x)
returns the inverse sine if x is in radians
y=acos(x)
returns the inverse cosine if x is in radians
y=atan(x)
returns the inverse tangent if x is in radians
y=pi
returns y with the value 3.141592653589793
Questions 13-15 No Answers Needed.
\
\
STUDY THE KAHOOT AS WELL IT WILL HELP!
\