Python Programming Quiz-03
Quiz
•
Engineering
•
Professional Development
•
Practice Problem
•
Medium
pragya _CSE
Used 10+ times
FREE Resource
Enhance your content in a minute
23 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Q-1. What will be the output of the following Python code?
a=[1,2,3,4,5,6,7,8,9]
print(a[::2])
[1,2]
[8,9]
[1,3,5,7,9]
[1,2,3]
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Q-2. The code below manipulates a Python list using the slicing operator. What will be the output?
a=[1,2,3,4,5,6,7,8,9]
a[::2]=10,20,30,40,50,60
print(a)
ValueError: Attempt to assign a sequence of size 6 to an extended slice of size 5
[10, 2, 20, 4, 30, 6, 40, 8, 50, 60]
[1, 2, 10, 20, 30, 40, 50, 60]
[1, 10, 3, 20, 5, 30, 7, 40, 9, 50, 60]
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Q-5. What is the correct command to shuffle the given Python list?
fruit=['apple', 'banana', 'papaya', 'cherry']
fruit.shuffle()
shuffle(fruit)
random.shuffle(fruit)
random.shuffleList(fruit)
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The code below uses a Python list and iterates using the range() function. What will be the output?
arr = [1, 2, 3, 4, 5, 6]
for i in range(1, 6):
arr[i - 1] = arr[i]
for i in range(0, 6):
print(arr[i], end = " ")
1 2 3 4 5 6
2 3 4 5 6 1
1 1 2 3 4 5
2 3 4 5 6 6
5.
DRAW QUESTION
2 mins • 2 pts
Draw the flow chart diagram to print the swap two numbers without using intermediate/
temporary variables and also take the input from users.

6.
DRAW QUESTION
2 mins • 2 pts
Make the use of a python program that accepts a sequence of
lines as input and prints the line after making all characters in the
sentence capitalized.
Input: “Hello GL BAJAJ..
Now we start to learn Python Programming Language”.
Output:
HELLO GL BAJAJ..
NOW WE START TO LEARN PYTHON PROGRAMMING
LANGUAGE.

7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following code snippet?
fruit_list1 = ['Apple', 'Berry', 'Cherry', 'Papaya']
fruit_list2 = fruit_list1
fruit_list3 = fruit_list1[:]
fruit_list2[0] = 'Guava'
fruit_list3[1] = 'Kiwi'
sum = 0
for ls in (fruit_list1, fruit_list2, fruit_list3):
if ls[0] == 'Guava':
sum += 1
if ls[1] == 'Kiwi':
sum += 20 print (sum)
22
21
0
43
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
18 questions
Orientation Training
Quiz
•
Professional Development
20 questions
RME Review - DOL Motor Starting
Quiz
•
Professional Development
20 questions
Prueba Analista de Tecnología
Quiz
•
Professional Development
20 questions
HIGHWAY ENGINEERING - VEDA - 12/05/2025
Quiz
•
Professional Development
20 questions
Topic 1 Question 180 to 200
Quiz
•
Professional Development
20 questions
unit 2 data
Quiz
•
Professional Development
20 questions
Egzamin zawodowy styczeń 2024 - PART 6
Quiz
•
Professional Development
20 questions
Quiz sobre Manufatura Tradicional x Avançada
Quiz
•
Professional Development
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Engineering
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...
