Python String Slicing

Quiz
•
Computers
•
University
•
Medium
Sarju S
Used 44+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of above Python code?
str1="6/4"
print("str1")
1
6/4
1.5
str1
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following will result in an error?
print(str1[2])
str1[1]="x"
print(str1[0:9])
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of below Python code?
str1="Information"
print(str1[2:8])
format
formatio
orma
ormat
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the code given below?
# Code snippet starts
org = ‘QuizOrbit’
print(org[-1:-6:-1])
# Code snippet ends
tibrO
Orbit
Quiz
QuizOrbit
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the output of the code given below?
# Code snippet starts
org = ‘QuizOrbit’
print(org[::-1])
# Code snippet ends
tibrOziuQ
QuizOrbit
OrbitQuiz
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of below code:
s=’cppbuzz chicago’
print(s[3:5])
buzzc
pbuzz
bu
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A string is an _______ data type.
Mutable
Immutable
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the last character in a string?
0
-1
1
Similar Resources on Wayground
9 questions
control statments quiz

Quiz
•
University
10 questions
Programming in C

Quiz
•
University
10 questions
CSC126_Chapter4_Part1

Quiz
•
University
6 questions
Python Basics: External Libraries

Quiz
•
University - Professi...
10 questions
0xDebug - Python

Quiz
•
University
10 questions
Intro to Programming Quiz

Quiz
•
University
10 questions
INTRODUCTION TO OOPS

Quiz
•
University
10 questions
Y6 - Programming A - Variables in games

Quiz
•
6th Grade - 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 Computers
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