What is the extension of a Python file?

Python_Quiz_1

Quiz
•
Computers
•
Professional Development
•
Hard
Marvin Chua
Used 2+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
.pyc
.py
.python
.pf
2.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
What is the correct syntax to output "Bye, World" in Python?
echo("Bye, World")
print("Bye, World")
printf("Bye, World")
print('Bye', 'World', sep=', ')
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Is Python compiled or interpreted?
Compiled
Interpreted
Both
Answer explanation
When you first run a Python script, it is converted to bytecode. This process is called compilation.
Python then executes the bytecode. This process is called interpretation.
Thus, Python is a hybrid language.
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following functions can convert a string to a float in Python?
str()
int()
float()
bool()
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the output of the following code?
print(type(10))
<class 'int'>
type(10)
<class 'str'>
"10"
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is used to define a function in Python?
func
function
def
define
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the output of the following code?
scores = [97, 98, 99, 100]
print(scores[0:3])
[97, 98]
[97, 98, 99]
[97, 98, 99, 100]
scores[0:3]
Answer explanation
When you use index slicing, such as scores[0:3]
you are getting the elements from index 0 to index 2.
In other words, from 0 (inclusive) to 3 (exclusive)
Create a free account and access millions of resources
Similar Resources on Quizizz
8 questions
Basic Python Data Types

Quiz
•
Professional Development
15 questions
Scope of Variables in Python

Quiz
•
1st Grade - Professio...
10 questions
C Programming

Quiz
•
Professional Development
15 questions
Flutter Q_0

Quiz
•
Professional Development
15 questions
Programming - Screening Test

Quiz
•
3rd Grade - Professio...
10 questions
CodeTigers Python 101

Quiz
•
KG - Professional Dev...
10 questions
Python-Quiz-Basic-Datatypes

Quiz
•
12th Grade - Professi...
15 questions
Arduino 102

Quiz
•
Professional Development
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade