
Python String Operations Quiz

Quiz
•
Computers
•
University
•
Hard
ANKUSH JOSHI
Used 1+ times
FREE Resource
58 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? print("Python"[0])
P
y
t
Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to define a string in Python?
str = 'Hello'
str = "Hello"
str = '''Hello'''
All of the above
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you find the length of a string in Python?
len(string)
length(string)
string.size()
string.length()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you concatenate two strings in Python?
str1 + str2
str1.concat(str2)
str1.add(str2)
str1 & str2
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? print("Python" + " Programming")
PythonProgramming
Python Programming
Python + Programming
Python
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? print("Hello"[1:4])
ell
llo
Hel
lo
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of "Python"[-1]?
P
n
y
Error
Create a free account and access millions of resources
Similar Resources on Wayground
53 questions
C Programming Quiz

Quiz
•
University
56 questions
Python Practice Test

Quiz
•
University
60 questions
Salesforce

Quiz
•
University
60 questions
VBIT CSM-A PYTHON QUIZ 3

Quiz
•
University
54 questions
Unit 4 Study Guide

Quiz
•
9th Grade - University
53 questions
Untitled Quiz

Quiz
•
University
62 questions
Câu hỏi về lập trình

Quiz
•
10th Grade - University
60 questions
THDC TH 4 chương đầu

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University