Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
1

HELPPPP... my friend and i have been trying to work this out for ages!!!

xxShrutixx
xxShrutixx

What is output by the following algorithm?
notice = “Please do not walk on the grass”
start = pos (notice, “ “)
end = pos (notice, “t”)
x = substring (0, start, notice)
stringLength = len(notice)
y = substring (end + 2, stringLength – 1, notice)
print (“x = ” x) x = n
print (“y = “, y) y =
print (x + y)

4 years ago

Voters

Comments

TopNew
1
timmy_i_chen
timmy_i_chen

Hi

@xxShrutixx
- you can put this in a repl and execute it to see its output: http://repl.it/languages/python3

4 years ago
Load more