HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Quizzes
  2. /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?
Python ProgrammingMediumHigh School (9–10)Python Basics › StringsPCEP (Python Institute)
StemPy LabCreated by StemPy Lab

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. s = "data" Which line runs with no error?

Log in to save
← All Quizzes
← A program takes two characters and a slice from a word. What does the program print?A loop cuts a string into pieces of two characters and builds a new string from the pieces. What does the program print? →
More onPython Basics › Strings

Discussion (0)

Log in to join the discussion.

Loading…

More questions on this topic

  1. A function builds the initials of a name, which has two spaces after its first word. Then the…Medium
  2. Five claims about the word loop use the in operator, slices that start inside or past the end, and…Hard
  3. A loop cuts a string into pieces of two characters and builds a new string from the pieces. What…Medium
  4. A program takes two characters and a slice from a word. What does the program print?Easy
  5. Four string methods work on the same text. What does the program print?Advanced
All questions on this topic →

Problems on this topic

  1. For the text "the cat sat on the mat", write the program lines that show: how many times at occurs…Medium
  2. A student wants to change the name "Rahul" to "Raju" and writes…Medium
  3. The variable word = "elephant" has eight letters…Easy
  4. The name is "asha rao". Show its initials in capital letters: AR.Hard
All problems on this topic →