
python strings

Quiz
•
Computers
•
University
•
Hard
V.UMARANI-MCA CT
Used 4+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
1. What will be the output of above Python code?
str1="6/4"
print("str1")
A. 1
B. 6/4
C. 1.5
D. str1
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
2. Which of the following will result in an error?
str1="python"
A. print(str1[2])
B. str1[1]="x"
C. print(str1[0:9])
D. Both (b) and (c)
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the output of below Python code?
str1="Information"
print(str1[2:8])
A. format
B. formatio
C. orma
D. ormat
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the output of below Python code?str1="Aplication"
str2=str1.replace('a','A')
print(str2)
A. application
B. Application
C. ApplicAtion
D. applicAtion
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
5. What will be the output of below Python code?
str1="poWer"
str1.upper()
print(str1)
A. POWER
B. Power
C. power
D. poWer
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
6. What will the below Python code will return?
If str1="save paper,save plants"
str1.find("save")
A. It returns the index position of the last occurance of "save" in the given string str1.
B. It returns the last index position of the last occurance of "save" in the given string str1.
C. It returns the last index position of the first occurance of "save" in the given string str1.
D. It returns the first index position of the first occurance of "save" in the given string str1.
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
7.Which of the following will give "Simon" as output?
If str1="John,Simon,Aryan"
A. print(str1[-7:-12])
B. print(str1[-11:-7])
C. print(str1[-11:-6])
D. print(str1[-7:-11])
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Intro-Computação_3.3

Quiz
•
University
10 questions
Python Basics Quiz

Quiz
•
7th Grade - University
8 questions
Python String Slicing

Quiz
•
University
15 questions
SCRIPTING PROGRAMMING WITH PYTHON

Quiz
•
University
12 questions
Lógica Programação

Quiz
•
University
9 questions
Python Basics Quiz for KS3

Quiz
•
11th Grade - University
10 questions
PF Unit 10

Quiz
•
9th Grade - University
11 questions
C Language

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