WorksheetsAssessment preparatory quiz
Total questions: 49
Worksheet time: 26mins
Python is a
text language
database language
programming language
Code for Hello, World!
print Hello, World!
print("Hello, World!)
print("Hello, World!")
Code for
Five is greater than two!
if 5 > 2:
print("Five is greater than two!")
if 5 = 2:
print("Five is greater than two!")
if 5 > 2: Print("Five is greater than two!")
Code for
257
Hello, World!
x = 257
y = "Hello, World!"
print(y)
print(x)
x = 257
y = "Hello, World!"
print(x)
print(y)
x = 257
y = Hello, World!
print x
print y
Code for
b is greater than a
a = 33
b = 200
if b > a:
print("b is greater than a")
a = 33
b = 200
if b < a:
print("b is greater than a")
a = 330
b = 200
if b > a:
print("b is greater than a")
In Python, a function is created by using which key word?
sub
fun
def
pro
import_turtle
turtle import
import turtle
from turtle import
turtle.penup()
turtle.pendown()
turtle.forward(120)
turtle.penup()
turtle.forward(120)
turtle.pendown()
What is the keyword needed to repeat code (iterate) in Python?
for
if
input
There is an error on this piece of code, what is wrong?
Nothing
No full stop needed in the pen.down statement e.g. turtle.pendown()
No brackets needed in the pen.down statement e.g. turtle.pen.down
No turtle prefix needed in the pen.down statement e.g. pen.down()
There is an error on this piece of code, how should it be written?
There is no error
turtle.right(90)
turn.right(90)
right(90)
There is an error on this piece of code, how should it be written?
There is no error
turtle.right(90)
turtle.drawcircle(10)
import.turtle
The program above
prints all the odd numbers between 1 and 20
prints all even numbers between 1 and 20
print all the odd numbers between 1 and 21
prints all the even numbers between 1 and 21
The above program prints
Numbers 1 to 10 in reverse order
Numbers 1 to 11 in reverse order
Numbers 1 to 10
Numbers 1 to 11
The program above prints each number between 1 and 10
as many times as the number itself
10 times
11 times
How many times will 1 be printed
3
4
5
6
The default return value of any function in Python is _______________.
null
0
None
Garbage value
Which of the following items are present in the function header?
Function name only
Both function name and parameter list
parameter list only
Return value
What does a opening tag look like?
< >
</ >
<< >>
<
What does a closing tag look like?
< >
<\ >
</ >
<< >>
Which tag would you use for an ordered list?
<ol>
<ul>
<li>
None of the above
What is the difference between <h1> and <h2>?
<h1> is larger in size than <h2>
<h2> is larger in size than <h1>
both are the same size but different headings
none of the above
Which tag would you use to insert a image?
<marquee>
< a href>
<br>
<img src>
Which tag would you use to create a hyperlink?
<a href>
<img src>
<br>
<link>
Which tag does not need a closing tag?
<a href>
<head>
<body>
<img src>
src attribute and then displays it.HTML controls the _________ of a webpage.
feel
precision
structure
style
Which code below is correct for a hyperlink
<a>
"https://google.com"
Click Me
</a>
<a>Click Me>
"https://google.com"
</a>
<a herf="https://google.com">
Click Me
</a>
<a href="https://google.com">
Click Me
</a>
Which is the correct HTML element for inserting a line break?
<b>
<lb>
<br/>
<break>
an opening tag that doesn't have a closing tag
comment
container tag
element
empty tag
only takes up as much width as necessary, and does not force line breaks
inline element
list
internal link
markup language
An <em> tag will
not work inside a div element.
mark text as having been highlighted.
make text appear to be bold.
make text appear to be in italics.
<input> is
a parent element of the <body> tag.
how you build a list of options in a form.
a block-level element.
an inline element.
<div> is
an inline element
a block-level element
the parent of the <body> tag
deprecated
Do block elements need to start on a new line ?
Yes
No
