
Introduction to Python Programming

Quiz
•
Other
•
University
•
Easy
M Pooja
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct file extension for Python files?
.py
.java
.txt
.cpp
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create a variable in Python?
You create a variable in Python by using the syntax: value = variable_name.
You initialize a variable in Python by writing: variable_name : value.
You declare a variable in Python with the command: var variable_name;
You create a variable in Python by using the syntax: variable_name = value.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to define a function in Python?
function
def
define
method
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid way to comment in Python?
/* This is a comment */
# This is a comment
// This is a comment
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of print(2 ** 3)?
6
9
8
4
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create a list in Python?
You create a list in Python using curly braces, e.g., my_list = {1, 2, 3}.
You create a list in Python using parentheses, e.g., my_list = (1, 2, 3).
You create a list in Python by using the list() function without any arguments.
You create a list in Python using square brackets, e.g., my_list = [1, 2, 3].
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function is used to read input from the user?
input()
getUserInput()
readInput()
fetchInput()
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Fundamentos de Estadística

Quiz
•
12th Grade - University
15 questions
Chapter 12 Quiz Review

Quiz
•
University
11 questions
Demo Test Python Loops and Conditions

Quiz
•
University
15 questions
Python Functions and File Handling Quiz

Quiz
•
University
10 questions
OPERACIONALIZACION DE LA VARIABLE

Quiz
•
University
10 questions
Introduction to R for Data Science

Quiz
•
University
10 questions
Taller 1 (4to): Captura y codificación de los datos en SPSS

Quiz
•
University
10 questions
M1: Repasemos

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University