![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 09.03.2020 17:20 maru91
Write a function called lucky_sevens that takes in one #parameter, a string variable named a_string. Your function #should return True if there are exactly three '7's in #a_string. If there are less than three or more than three #'7's, the function should return False.
For example:
# - lucky_sevens("happy777bday") should return True.
# - lucky_sevens("h7app7ybd7ay") should also return True.
# - lucky_sevens("happy77bday") should return False.
# - lucky_sevens("h777appy777bday") should also return False.
Hint: Remember in Chapter 3.3, 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 variable(s) 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.
![ansver](/tpl/images/cats/User.png)
Answers: 3
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 13:30, juliajordan427
Best laptops for college [$100-$500 range]?
Answers: 2
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 14:30, yeet74
Ahousehold consists of a married couple and their twin five-year old daughters. the couples children had no income and lived with their parents all of last year. how many exemptions can the couple claim on last years tax return or they file with the “ married filing jointly “ status? a. 4 b. 5 c. 3 d. 2
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 25.06.2019 05:30, 19jcormier
You are asked to calculate an object's velocity, in order to do so you must know the object's a. direction and speed. b. distance and time. c. speed and distance. d. direction and distance.
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 25.06.2019 12:00, chimbali9736
This keeps happening when i try to go to from google or even submit a question
Answers: 2
You know the right answer?
Write a function called lucky_sevens that takes in one #parameter, a string variable named a_string....
Questions in other subjects:
![Konu](/tpl/images/cats/himiya.png)
![Konu](/tpl/images/cats/es.png)
Spanish, 23.11.2019 19:31
![Konu](/tpl/images/cats/en.png)
English, 23.11.2019 19:31
![Konu](/tpl/images/cats/fizika.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/informatica.png)
Computers and Technology, 23.11.2019 19:31
![Konu](/tpl/images/cats/himiya.png)
![Konu](/tpl/images/cats/biologiya.png)
![Konu](/tpl/images/cats/mkx.png)
Arts, 23.11.2019 19:31
![Konu](/tpl/images/cats/en.png)
English, 23.11.2019 19:31