
Mastering Python Basics

Quiz
•
Computers
•
11th Grade
•
Hard
Imhotep Brooks
FREE Resource
17 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code: if 5 > 3: print('A') else: print('B')?
B
5
A
C
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you define a function in Python?
def function_name(parameters):
function_name: parameters()
create function_name(parameters)
function_name(parameters) =>
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the result of int('10') + 5?
15
5
10
20
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you format a string to include variables in Python?
You can format a string to include variables using f-strings, format() method, or % operator.
Using the join() method to combine strings
Using the eval() function
Concatenating strings with + operator
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'elif' statement in Python?
The 'elif' statement is a way to create loops in Python.
The 'elif' statement is used to handle exceptions in Python.
The 'elif' statement is used to define functions in Python.
The 'elif' statement allows for multiple conditional checks in an if-else structure.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Write a function that returns the square of a number.
def square(num): return num + num
def square(num): return num - num
def square(num): return num * num
def square(num): return num / num
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code: str(100) + ' is a number'?
100 is not a number
100 is a string
100 is an integer
100 is a number
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Python Built-in Functions

Quiz
•
11th - 12th Grade
12 questions
Python - Abstractions, Comments, Data Types, Variables

Quiz
•
9th - 12th Grade
18 questions
Kiểu dữ liệu xâu kí tự trong Python

Quiz
•
10th Grade - University
16 questions
Python

Quiz
•
11th Grade
15 questions
Python Quiz

Quiz
•
9th - 12th Grade
12 questions
Functions With Return Values U1M2 Python

Quiz
•
9th - 12th Grade
15 questions
Grade 8 End of Unit Revision

Quiz
•
8th Grade - University
15 questions
Programming python review

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade