Question: Do all of this in python no C++ or C language provide both the source code and output for each problem Problem 13 Write a

Do all of this in python no C++ or C language provide both the source code and output for each problem

Problem 13

Write a program asking the user to keep entering in strings (ie names) until they enter the string leave, at which point youll exit the loop and tell them how many times they entered the string gold. This one requires that you use a loop and also keep a tally of the number of times they enter the string gold.

Problem 14

Implement a function called zeros_and_ones() that takes a list s as argument and returns the number of zeros and ones in a dictionary d.

s = [1,0,1,0,0,1,0,0,1,0,0,1,1,1,1,0,0,0,1,0,1,1,1,1,1]

Hint:

Your program should output {0: 11, 1: 14}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!