Question: Write Python functions for the following tasks: a) Create a function that accepts a list of bit strings and, for each bit string, finds
Write Python functions for the following tasks: a) Create a function that accepts a list of bit strings and, for each bit string, finds the number of 1's. The number of 1's in each bit string should be placed in a list, so that the number of 1's is in the same element as the bit string it represents. Return the list of counts. b) Write a Python function that will prompt the user to enter two integers and then creates a list "thelist" of random integers in the range of the two entered integers say "start" and "end". Finally, the function should display the elements of the list "thelist" on a single line separated by" ".
Step by Step Solution
3.32 Rating (143 Votes )
There are 3 Steps involved in it
Here are Python functions for the tasks you descri... View full answer
Get step-by-step solutions from verified subject matter experts
