If a=(1,2,3,4), a[1:-1] is _________

Python Workshop

Quiz
•
Other
•
Professional Development
•
Hard
Sumit Anand
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
a) Error, tuple slicing doesn’t exist
b) [2,3]
c) (2,3,4)
d) (2,3)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose list1 is [2, 33, 22, 24, 25], What is list1[:-1]?
a) Error
b) [2, 33, 22, 24]
c) 25
d) [25, 24, 22, 33, 2]
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the output of the “hello” +10+20+30?
a) hello102030
b) hello
c) Error
d) hello60
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
>>>str1="helloworld"
>>>str1[::-1]
a) dlrowolleh
b) hello
c) world
d) helloworld
5.
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) /*
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the given code?
a) 10 20 10
b) 10
c) 20
d) 10 20
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output ?
a) Numbers 1 to 10 in reverse order
b) Numbers 1 to 11 in reverse order
c) Numbers 1 to 10
d) Numbers 1 to 11
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
Lists and operators

Quiz
•
Professional Development
10 questions
TEST 2 PISAV XII TAV Audio Paging

Quiz
•
12th Grade - Professi...
15 questions
TIU CPNS BIMBEL MBAK ICHA JULI 2021

Quiz
•
Professional Development
15 questions
Đập đá ở Côn Lôn

Quiz
•
Professional Development
10 questions
POST TEST PKP Employee Advocacy 2023

Quiz
•
Professional Development
13 questions
TATABAHASA PT3

Quiz
•
KG - Professional Dev...
12 questions
NHVH THÁNG 11 - NHẬN TRÁCH NHIỆM

Quiz
•
Professional Development
8 questions
QUIZ SEMANA 5

Quiz
•
7th Grade - Professio...
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