Question: #Write a function called lucky _ sevens that takes in one #parameter, a string variable named a _ string. Your function #should return True if
#Write a function called luckysevens that takes in one
#parameter, a string variable named astring. Your function
#should return True if there are exactly three s in
#astring. If there are less than three or more than three
#s the function should return False.
#
#For example:
# luckysevenshappybday" should return True.
# luckysevenshappybday should also return True.
# luckysevenshappybday" should return False.
# luckysevenshappybday" should also return False.
#
#Hint: Remember in Chapter we covered how to use a loop
#to look at each character in a string.
#Write your function here!
#Below are some lines of code that will test your function.
#You can change the value of the variables to test your
#function with different inputs.
#
#If your function works correctly, this will originally
#print: True, True, False, False, each on their own line.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
