Home / Expert Answers / Computer Science / problem-12-all-in-python-learn-how-to-convert-from-decimal-to-binary-do-three-examples-by-hand-pa611

(Solved): Problem 12 All in Python! Learn how to convert from decimal to binary. Do three examples by hand ...



Problem 12 All in Python! Learn how to convert from decimal to binary. Do three examples by hand of the conversion (upload your hand written conversions into your PDF). Now, write a program to convert decimal to binary and test it on the problems you solved by hand to make sure your answers are correct Regardless of the programming language the code to convert digital to binary is only a few lines long and you can find examples of it online very easily. You don’t need to worry about negative numbers. Show your three handwritten solutions as well as the source code and output of your program proving it gets the same answers as you did by hand. Problem 13 Write a program asking the user to keep entering in strings (ie names) until they enter the string “leave”, at which point you’ll 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} Problem 15 Write a function min_max() that takes a list s as an argument, and print the minimum and maximum values along with their ranks, ie, their positions (starting at 1) in the input. Example: my_list = [3, 1, 5, 4, 2] The minimum value is 1 and the rank is 2 in the list The maximum value is 5 and the rank is 3 in. the list Question 4 # your code here my_list = [3, 1, 5, 4, 2] min_max(my_list) Hint: your output should look like this min is 1 rank is 2 max is 5 rank is 3



We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe