IT 116: Introduction to Scripting
Class 13 Ungraded Quiz

  1. If you wanted to use the functions in the math module inside your script, what statement should appear at the top of the script?


  2. If you wanted to print the value of pi from the math module, what statement would you use?


  3. Write the a function call that will return the value of the sine of π. The sine function in the math module is sin


  4. What do you call a variable that is defined OUTSIDE any function?


  5. Can a function use a variable defined outside any function?


  6. Are the series of numbers created by the functions in the random module really random?


  7. If you wanted to use the functions in the random module inside your script, what statement should appear at the top of the script?


  8. 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?


  9. Can a return statement return more than one value?


  10. What do you call the initial value given to an algorithm used to generate "random" numbers.