Answer to Question #819 in Python for justin

Question #819
Create a function triangle(s), which takes a string s as its argument and prints the successive characters of the string on each line. For example&
& >>> triangle("CMPT")&
C&
CM&
CMP&
CMPT&


You will implement this function in two ways:&
(a) using string slices1;&
(b) without using string slices.
1
Expert's answer
2010-10-28T09:57:50-0400
This question can be posted as an assignment to our site and our experts will assist you.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS