For Python please! Z\'s eat E\'s They Might be Giants has a song called \"E\'s E
ID: 3805072 • Letter: F
Question
For Python please!
Z's eat E's They Might be Giants has a song called "E's Eat Anything". At the conclusion of the song we find that the letter Z likes to eat letter E's. Count how many times the letter Z is followed by the letter E in a string. Checksum When transferring data over a network, sometimes errors occur and bits in the data are accidentally changed. A checksum is a numerical value based on a mathematical operation performed on the data. If a file is transferred with a checksum you can check if the file matches the checksum after the transfer for some assurance that there were no errors. The simplest checksum is simply to add up all the bytes in the data. Write a method called string_checksum that converts each letter to an integer (use the ord() function) and sums the result and returns this as the checksum.Explanation / Answer
s = raw_input("Enter a string:")
s = s.lower()
s = s.split('z')
count=0
for a in s:
if a[0] == 'e':
count+=1
print("The number of time Z eats E is "+str(count))
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.