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 for loop walks through a string and prints each character twice. What does the program print?
Python Programming
Easy
High School (9–10)
Python Basics › Loops
PCEP (Python Institute)
Created by
StemPy Lab
Stuck? Show a hint
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?
aa-bb-cc
a-a-b-b-c-c-
aa-bb-cc-
aabbcc-
Check Answer
Log in to save
Tag someone
⚑ Report
← 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 on
Python Basics › Loops
Discussion (0)
Log in
to join the discussion.
Loading…
All questions on this topic →
Problems on this topic
This loop should show the even numbers from 2 up to and including 10…
Medium
Write a program that asks for a password, again and again, until the user types python123…
Medium
Find the first number from 100 upwards that can be divided by both 6 and 8…
Easy
Asha saves 45 rupees every week, and has 0 at the start…
Easy
All problems on this topic →