223k views
1 vote
What is output by the following algorithm?

notice = "Please do not walk on the grass"
stringLength = notice.length
left = notice.left(11)
right = notice.right(11)
print(stringLength)
print(left)
print(right)

3 mark question
please help hw due soon

User Charisis
by
3.9k points

1 Answer

5 votes

Answer:

The algorithm will output the length of the string "Please do not walk on the grass", the first 11 characters of the string, and the last 11 characters of the string. For example, the output might look something like this:

35

Please do no

walk on the g

User Jani Siivola
by
3.3k points