NEW
Font size
WorksheetsBZA Python Programming 3
Total questions: 20
Worksheet time: 10mins
What would this code do?
print('Hello World!')
hello world
Hello World!
hello world!
'Hello World!'
What is the correct way to make python program so it says Pleased to meet you
print('Pleased to meet you.')
print('Pleased to meet you.)
Print('Pleased to meet you.')
print 'Pleased to meet you.'
What does this code do when run the following program:
name='Aluko'
print('Hello '+name)
hello aluko
Hello aluko
'Hello Aluko'
Hello Aluko
What is missing to complete this code:
language='Python'
print('I am learning to program in'______)
+ language
+ Language
language
Language
What word best complete this code?
print('I am ____ when l try my best')
Rubbish
Amazing
So so
Lucozade
What would this code print?
name='Chan'
name='Aluko'
print(name)
Chan
name
Aluko
print Aluko
What would this code print?
name='Chan'
name='Aluko'
name='WDF'
print(name)
Aluko
Chan
WDF
name
What would this code print
name='Poppy'
name='Beka'
print('Hello '+name)
Poppy
Liz
Hello Poppy
Hello Beka
The symbol + is used to concatenate, what does this do?
Add stuff
Jog stuff
Join things
It's a sign
What is the purpose of the input command?
To make a user/someone to answer a question
To ask or extract something
Important question
Inputting stuff
The program below asks for the town you live in, it is testing the use of?
town = input('Which town do you live in? ')
print('I love visiting ' + town)
Variable town, input + & print result
Where you love visiting
Programming stuff
I don't know yet
A program that asks for your first name, your last name and finally greets you with your full name.
name1 = input('What is your first name? ') James
name2 = input('What is your last name? ') Bond
print('Hello ' + name1 + ' ' + name2)
My Name is Bond James Bond
Mr Bond
Hello James Bond
Hello Bond James
What is the output of this code below?
name = input('What is your name? ') Dr Who
print(name + ' ' + name + ' ' + name + ' ' + name + ' ' + name)
Dr WhoDr WhoDr WhoDr WhoDr Who
Dr Who Dr Who Dr Who Dr Who Dr Who
Dr Dr Dr Dr Dr
Who Who Who Who Who
Python program 3, can carry out calculations. The arithmetic operators we use to do this are: Addition, Subtraction, Multiplication & Division?
Plus, Subtract, Times & Divide
+ - * /
+ - x \
+ - * \
Using Int(Integer) in python means what?
Interger
Internet
Decimal number
Whole number
What is the output of these code?
print(1 + 6)
print(7 - 5)
print(3 * 9)
print(7 / 2)
7
2
27
3.5
7
2
12
3
7
12
6
3.5
7
12
27
3.5
What is the output of these code?
a = 7
b = 8
c = a + b
print(c)
51
15
c
= 7 + 8
A boolean condition is one that can have only two values true or false, yes or no, 0 or 1 like in a binary, on or off like switch - power button?
TRUE
FALSE
In python, what does != operator mean?
Exclamation mark
Shouting loud
not equal to
Very equal to
What is the reset password in this code?
password = input('Please enter the password: ')
while password != "Password1":
print('Incorrect!')
password = input('Please enter the password: ')
print('Accepted')
Enter
password1
Apple1
Password1
