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.
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment