Write a program that prompts a user to enter a series of words (strings) represe
ID: 3544596 • Letter: W
Question
Write a program that prompts a user to enter a series of words (strings) representing binary numbers (0s and 1s). Your program then checks whether the words are indeed binary numbers, numbers contains only 0s and 1s. If it is not the case, your program should print a message that the number is not a valid binary number. If it is a valid binary number then your program should count how many 1s are in the word and output the count.
Send a welcome banner/message with your name(s) somewhere in it. Be sure to end your program with a closing message so the user knows the program has terminated normally.
Explanation / Answer
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.