Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What is a variable cost? Identify two variable costs.

Answered: 1 week ago