IT 116: Introduction to Scripting
Class 13 Ungraded Quiz
-
If you wanted to use the functions in the math module
inside your script, what statement should appear at the top of the script?
-
If you wanted to print the value of pi from the
math module, what statement would you use?
-
Write the a function call that will return the value of the sine of π.
The sine function in the math module is
sin
-
What do you call a variable that is defined OUTSIDE any
function?
-
Can a function use a variable defined outside any function?
-
Are the series of numbers created by the functions in the random
module really random?
-
If you wanted to use the functions in the random module
inside your script, what statement should appear at the top of the script?
-
If you wanted to simulate the throw of a die using the randint
function of the random module, what would you use as the function call?
-
Can a
return
statement return more than one value?
-
What do you call the initial value given to an algorithm used to generate "random" numbers.