xyz_there¶
Requirements:
substrings and slicing
if, else
loop through a string (while)
Output True
if the given string contains an appearance of "xyz"
where the xyz
is not directly preceeded by a period (.
). So "xxyz"
counts but "x.xyz"
does not.
This exercise was taken from codingbat.com and has been adapted for the Python language. There are many great programming exercises there, but the majority are created for Java.