Computational Thinking (IV) - Exam Reference Language Flashcards
What does the comparison operator == mean?
Equal to
What does the comparison operator != mean?
Not equal to
What does the comparison operator < mean?
Less than
What does the comparison operator <= mean?
Less than or equal to
What does the comparison operator > mean?
Greater than
What does the comparison operator >= mean?
Greater than or equal to
What is the arithmetic operator for addition?
+
What is the arithmetic operator for subtraction?
-
What is the arithmetic operator for multiplication?
*
What is the arithmetic operator for division?
/
What is the arithmetic operator for exponent?
What is the arithmetic operator for modulus?
MOD
What is the arithmetic operator for quotient?
DIV
What are the three Boolean operators?
AND (logical AND)
OR (logical OR)
NOT (logical NOT)
What is used for a comment?
Give an example
//
//Square a number squared = number^2
//Print the result print(squared)
What is the symbol for the assignment of a variable?
Give an example
=
name = “Bob”
What is the keyword for a constant?
Give an example
const
const temperaturelimit = 39.8
What is the keyword for a global variable?
Give an example
global
global schoolID = “Noadswood”
How can an input be given?
input(…)
How can an output be given?
print(…)
What casting keywords are used?
str()
int(“3”)
float(“4.52”)
real(“4.52”)
bool(“True”)
Give an example of the FOR loop (count-controlled) iteration using for… to… next…
for i = 0 to 9
print(“Loop”)
next I
This will print the word “Loop” ten times