NEW
Font size
WorksheetsPython basics
Total questions: 20
Worksheet time: 20mins
name = 'Dave'
print (name)
Which is the Python logo?
What is an input?
A command that allows us to ask the user to enter some data.
To plug in something.
Data displayed on a screen.
A function
What is an output?
A piece of data that is shown on the screen.
Data that the user enters
An output
A orange
To display the following on screen
Hello World!
the following command should be used:
print(Hello World!)
print("Hello World!")
print("Hello World" + !)
print"(Hello World!)"
x = 5
y = 6
print("x*y")
The code above displays the following:
11
x*y
Syntax Error
30
Choose the correct operators used in python:
divide, multiply, add, subtract
/, *, +, -
div, mul, +, -
\, x, +, -
~, *, +, -
Which operator checks if a value is equal to another value?
+
=
==
!=
Which operator checks if a value is not equal to another value?
==
+=
!=
=
A data type that can have one of two values: True or False
boolean
variable
modulo
interpreter
name = "Bob"
if name == "Bob":
print ("Hello " + name)
else:
print ("I dont know you")
Integers are ____________ and floats are _____________
whole numbers and exponents
powers and fractions
fractions and whole numbers
whole numbers and decimal numbers
