NEW
Font size
WorksheetsModules, Packages, and Libraries
Total questions: 10
Worksheet time: 5mins
A Python file that contains variables and functions and can be used in other programs is called a _________________.
class
documentation
dictionary
module
A collection of modules and packages that can be imported into a program is called a __________.
class
documentation
library
function
How could you use the sqrt function from the math module to print the square root of 16?
import sqrt print(math.sqrt(16))
from math import sqrt print(math.sqrt(16))
from math import sqrt print(sqrt(16))
import sqrt print(sqrt(16))
What is pseudocode?
Variable
A way to represent algorithms using encrypted code
Constant
A way to represent algorithms using written language
__________ keyword is used for creating a function in Python.
define
fun
def
function
Which loop do you use to repeat only 5 times?
IF loop
FOR loop
Never ending loop
Selection loop
The code below is a function call. What is inside the brackets "( )"?
A parameter
Literal
An IF statement
Function
What is the extension of python library modules?
.mod
.lib
.code
.py
How do you tell python you want to use the turtle library
turtle import
import turtle
from libraries import turtle
from turtle import libraries
In python which is the correct method to load a module math?
include math
import math
#include<math.h>
using math
