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
10 questions
basic programming quiz

Quiz
•
University
5 questions
Python

Quiz
•
University
10 questions
Python Sets

Quiz
•
University
10 questions
Unit 2 Python

Quiz
•
University
12 questions
Python Quiz

Quiz
•
University
7 questions
Python Round 4

Quiz
•
University
6 questions
sample qizz

Quiz
•
University
10 questions
TIU Quiz-4

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University