Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Community ▾
A
A
Quizzes
/
A program takes two characters and a slice from a word. What does the program print?
Python Programming
Easy
High School (9–10)
Python Basics › Strings
PCEP (Python Institute)
Created by
StemPy Lab
Stuck? Show a hint
A program takes two characters and a slice from a word.
s = "certify" print(s[2], s[-2], s[1:4])
What does the program print?
e f ert
r i ert
r f ert
r f erti
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← The first line typed says how many words follow. The user types 3, then pear, fig and plum, one on each line, and the program keeps the longest word. What is printed?
A student wants to change the word "data" so that it starts with a capital D. The program starts with s = "data", and then one of four lines is run. Which line runs with no error? →
More on
Python Basics › Strings
Discussion (0)
Log in
to join the discussion.
Loading…
All questions on this topic →
Problems on this topic
For the text "the cat sat on the mat", write the program lines that show: how many times at occurs…
Medium
A student wants to change the name "Rahul" to "Raju" and writes…
Medium
The variable word = "elephant" has eight letters…
Easy
The name is "asha rao". Show its initials in capital letters: AR.
Hard
All problems on this topic →