
Python Quiz

Quiz
•
Computers
•
University
•
Medium
Aditya Bakshi
Used 10+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which of the following is the correct extension of the Python file?
.python
b) .pl
c) .py
d) .p
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which of the following character is used to give single-line comments in Python?
a) //
b) #
c) !
d) /*
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the output of the following Python code?
a) 1 2 3
b) error
c) 1 2
d) none of the mentioned
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the output of the following Python code snippet if x=1?
x<<2
a) 4
b) 2
c) 1
d) 8
5.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which of the following is true for variable names in Python?
a) underscore and ampersand are the only two special characters allowed
b) unlimited length
c) all private members must have leading and trailing underscores
d) none of the mentioned
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the output of the following Python code?
a) error
b) 1 2 3 4
c) a b c d
d) 0 1 2 3
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the output of the following Python program?
a) error
b) 0 1 2 0
c) 0 1 2
d) none of the mentioned
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Python Basics Quiz 1

Quiz
•
8th Grade - University
10 questions
C Programming Quiz-6

Quiz
•
University
9 questions
Python Basics Quiz for KS3

Quiz
•
11th Grade - University
10 questions
Python

Quiz
•
University
10 questions
Python Control Statements

Quiz
•
University
9 questions
Python

Quiz
•
University
10 questions
Python Unit 3

Quiz
•
University
15 questions
SCRIPTING PROGRAMMING WITH PYTHON

Quiz
•
University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade