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 for loop walks through a string and prints each character twice. What does the program print?
Python ProgrammingEasyHigh School (9–10)Python Basics › LoopsPCEP (Python Institute)
StemPy LabCreated by StemPy Lab

A for loop walks through a string and prints each character twice. for ch in "abc": print(ch * 2, end="-") print() What does the program print?

Log in to save
← All Quizzes
← Bitwise operators work on the binary digits of whole numbers. Each line below combines 6 and 3, or shifts 1, and compares the result with ==. Pick every comparison that comes out True. More than one may be right.A while loop walks through a word with an index. After it finds the letter a, it jumps two places ahead. What is printed? →
More onPython Basics › Loops

Discussion (0)

Log in to join the discussion.

Loading…

More questions on this topic

  1. In the middle of a for loop, the function tally puts 10 into i. It returns a sum and i together.…Hard
  2. A function should return the largest number of a list. For a list of negative numbers it gives the…Medium
  3. A while loop asks the function more whether to go on. That function also shows the number it was…Medium
  4. A function puts new numbers at the end of a list while a for loop runs over range(len(vals)). What…Medium
  5. A program searches a table, stored as a list of lists, for a negative number. It uses break…Hard
All questions on this topic →

Problems on this topic

  1. This loop should show the even numbers from 2 up to and including 10…Medium
  2. Write a program that asks for a password, again and again, until the user types python123…Medium
  3. Find the first number from 100 upwards that can be divided by both 6 and 8…Easy
  4. Asha saves 45 rupees every week, and has 0 at the start…Easy
All problems on this topic →