Question
Majority rule. Python Programming In Congress, members typically vote electronically. A bill requires a simple majority of Yea votes (more than 50%) to pass. There
Majority rule. Python Programming
In Congress, members typically vote electronically. A bill requires a simple majority of "Yea" votes (more than 50%) to pass. There are 435 members in the House of Representatives and 100 in the Senate. Write a function that declares two parameters: the number of "Yea" votes, and which chamber is voting ("house" or "senate") and returns the value True if the bill received enough votes to pass, and False if it did not. Use your function to write a main() that lets the user enter the vote and reports whether the bill succeeded; use an exception handler to deal with the case that the user types in an invalid number.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started