Python Course

Create an engaging digital illustration of a person happily coding in Python, surrounded by colorful Python mascots and a computer displaying code snippets.

Python Basics Quiz

Test your knowledge of Python with this engaging quiz designed for beginners and enthusiasts alike! Dive into various concepts and syntax of Python programming quickly and easily.

With 10 multiple-choice questions, you’ll learn about:

  • Basic operations
  • Data types
  • Control flow
  • String formatting
  • And more!
10 Questions2 MinutesCreated by CodingTiger247
What is the value returned by the following script?
 
if 5 % 2 == 1:
      print('5 is odd.')
elif 6 % 2 == 0:
      print('6 is even.)
5 is odd.
6 is even.
5 is odd. 6 is even.
How do you write a for loop that goes through numbers 1 through 5?
For I in [1, 6]:
For I in range(1, 5):
For I in range(1, 6):
What are the values of the following expressions?

print('%.2f' %12.345)
print('%.1f' %12.345)
12 and 12
12.35 and 12.3
12.35 and 12
How do you assign the text "Alice" to a variable called first_name?
First_name = 'Alice'
First_name = "Alice"
First_name = 'Alice' or first_name = "Alice"
"first_name" = "Alice"
What is the value of the following expression?
 
"*" * 5
'*****'
*5
SyntaxError
*****
What is the value returned by the following script?
 
first_name = 'Alice'
print first_name
SyntaxError
Alice
None
'Alice'
mylist = [None, [1, 2], 'a', 1]

What is the value of mylist[1]?
[1, 2]
None
'a'
What is the value of the following expression?
 
half = 'half' '
1/2 is %d' %half
TypeError
1/2 is half
1/2 is 'half'
What is the value of the following expression?
 
half = 1/2
'1/2 is %s.' %half
'1/2 is 1.'
'1/2 is half'
TypeError
'1/2 is 0.5.'
What is the value returned by the following script?
 
type(1/2)
Float
Int
{"name":"Python Course", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of Python with this engaging quiz designed for beginners and enthusiasts alike! Dive into various concepts and syntax of Python programming quickly and easily.With 10 multiple-choice questions, you’ll learn about:Basic operationsData typesControl flowString formattingAnd more!","img":"https:/images/course2.png"}
Powered by: Quiz Maker