Module 2 Knowledge Check
(What does the following code print (be exact, but you don't need to worry about new line characters.
first = "Ada Lovelace"
print("The world's first programmer is " + first + ".") - answerThe world's first programmer
is Ada Lovelace.
Best match the code with the description of what it does.
1) wage = 20
2) print(wage)
3) print("wage")
4) print(20) - answer1) Stores the numeric value 20 in the variable wage
2) prints value of wage to the screen
3) prints the word wage to the screen
4) prints 20 to the screen
Match the error with the definition.
1) ValueError
2) SyntaxError
3) TypeError
4) IndintationError
5) NameError - answer1) An invalid value is used - can occur if giving letters to int().
2) The program contains invalid code that cannot be understood.
3) An operation uses incorrect types - can occur if adding an integer to a string.
4) The lines of the program are not properly indented.
5) The program tries to use a variable that does not exist.
The following is based on which law of technology?
Facebook is known for being a technology for families to stay in contact, share information and photos. At the same time, facebook is known for selling your information to different companies that can mine that data for their own unknown uses. -
answerTechnology is neither good nor bad; nor is it neutral.
Which law does the following statement describe?
"The creation of technology creates more technology." - answerInvention is the mother of necessity.
(What does the following code print (be exact, but you don't need to worry about new line characters.
first = "Ada Lovelace"
print("The world's first programmer is " + first + ".") - answerThe world's first programmer
is Ada Lovelace.
Best match the code with the description of what it does.
1) wage = 20
2) print(wage)
3) print("wage")
4) print(20) - answer1) Stores the numeric value 20 in the variable wage
2) prints value of wage to the screen
3) prints the word wage to the screen
4) prints 20 to the screen
Match the error with the definition.
1) ValueError
2) SyntaxError
3) TypeError
4) IndintationError
5) NameError - answer1) An invalid value is used - can occur if giving letters to int().
2) The program contains invalid code that cannot be understood.
3) An operation uses incorrect types - can occur if adding an integer to a string.
4) The lines of the program are not properly indented.
5) The program tries to use a variable that does not exist.
The following is based on which law of technology?
Facebook is known for being a technology for families to stay in contact, share information and photos. At the same time, facebook is known for selling your information to different companies that can mine that data for their own unknown uses. -
answerTechnology is neither good nor bad; nor is it neutral.
Which law does the following statement describe?
"The creation of technology creates more technology." - answerInvention is the mother of necessity.