What will be the output of the following code?
s = "Python Programming"
print(s[7:18])
Python Unit 3
Quiz
•
Computers
•
University
•
Easy
Vishwanath Vishwanath
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
s = "Python Programming"
print(s[7:18])
Programming
Python
Python Programming
Programmin
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you define a list in Python?
list = {1, 2, 3, 4}
list = [1, 2, 3, 4]
list = "1, 2, 3, 4"
1 ,2,3,4
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to define a tuple?
t = (1, 2, 3, 4)
t = "1, 2, 3, 4"
t = {1, 2, 3, 4}
None
4.
FILL IN THE BLANK QUESTION
1 min • 1 pt
A tuple is an ___sequence in Python,
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
d = {"a": 1, "b": 2, "c": 3}
print(d.get("d", 10))
10
d
Error
D 10
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
s = "python programming"
print(s.title())
"Python Programming"
"PYTHON PROGRAMMING"
"Python programming"
Error
Answer explanation
The title() method capitalizes the first letter of each word in the string.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you define a function in Python?
func function_name():
define function_name():
function function_name():
def function_name():
15 questions
PYTHON BOOTCAMP
Quiz
•
University
10 questions
Machine Learning and Python.
Quiz
•
University
15 questions
Python
Quiz
•
University
10 questions
Python Round 2
Quiz
•
University
15 questions
Exploring Python Fundamentals
Quiz
•
12th Grade - University
15 questions
CSE 102 Exam 2 Practice
Quiz
•
University
15 questions
Python Programming - Introduction
Quiz
•
University
12 questions
CSSE Quiz Day2
Quiz
•
University
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