NEW
Font size
WorksheetsPYTHON QUIZ 3.1
Total questions: 40
Worksheet time: 20mins
holds whole numbers
holds a decimal point in a number
What data type would be used for storing someone's telephone numbers?
Float (using a decimal point)
Integer (just whole numbers)
String (alphanumerical data)
Boolean (true or false)
If we needed to store information such as a POSTCODE in PYTHON, what data type would we use?
String (alphanumerical)
Float (decimal point)
Boolean (true or false)
Integer (just whole numbers)
What is the function of the code: amount = int(input("Enter a conversion into pounds:)) currency = input ("press 1 for Philippine peso, 2 for US dollar or 0 to exit:")
to find the total amount of currency altogether
to calculate and convert the exchange rates.
what is the code for a STRING in python?
str
stri
stg
What is the output from the following code? print ("hello world")
Hello World
hello world
print hello world
"hello world"
print(Hello world!)
print(3+4)
print("3+4")
print("Hello" + "world!")
print("Hello" + "world" + "today")
A procedure to follow, especially using iteration and conditionals
For Loop
Algorithm
Return Value
Concatenation
A(n) relational operator is:
An expression that can be evaluted as TRUE or FALSE. Often used in CONDITIONAL STATEMENTS, such as IF (condition) THEN (action1) ELSE (action2)
A symbol that represents a compare action for a computer to take. Examples are: ">" (greater than), "<" (less than) and "=" (equal)
Operators that are used to combine or change Boolean Expressions. The 3 standard operators are AND, OR, and NOT.
Control block that looks for events to then perform action
colour = input(“Enter a colour”)
