NEW
Font size
WorksheetsPythonintro
Total questions: 15
Worksheet time: 8mins
What is Python?
An Operating System
A network
A programming language
A browser
Python was created by
Linus Torvalds
Dennis Ritchie
Guido van Rossum
Steve Jobs
What will be the output?
name = 'Dave'
print (name)
name
Dave
'Dave'
print('name')
When you have an error in your code what is the term to summarize finding and fixing that error?
Error checking
Debugging
Error finder
Syntax finder
How do you display text?
input
output
variable
What is syntax?
Syntax is the word used to describe a variable
Syntax is the rules of the programming language
This is used to read information
It is used to output information
What will the following code do:
print("What is your name?")
Allow you to type in your name
Display the words 'What is your name?' on the screen
Allow you to enter information
Print your name to the screen
The following code is used to create a variable and store a value. Why will it NOT work?
my number = 36
The variable can't store a number
A variable name cannot have any spaces
There variable name can't be called my number
The equals symbol should be at the beginning of the line
The following variable contains some data. What is the data type that is being stored.
hobby = "football"
Integer
Float
String (Text)
Boolean
What will the output be from the following code?
print("Hello world!")
SyntaxError
Hello world!
"Hello world!"
print(Hello world!)
What will the output be from the following code?
Print("Hello world!")
NameError
Hello world!
"Hello world"
Print(Hello world!)
What will the output be from the following code?
print(Hello world!)
Hello world!
Hello world
SyntaxError
print(Hello world!)
What is a variable?
A box(memory location) where you store values
Data type
a type of graphics
a type of memory
What will be the output?
x = float("3")
print(x)
"3"
3
3.0
float
What will be the output?
x = int(1j)
print(x)
1
1j
type error
print(1j)
