Question

There are eligibility requirements for a person to serve as President, Senator and Representative in the...

There are eligibility requirements for a person to serve as President, Senator and Representative in the US Federal Government. For example, to be a US senator they must be at least 30 years old and have been a US citizen for at least 9 years. To be a US representative these numbers are 25 and 7, respectively. Write pseudocode and a program that requests necessary eligibility information as input and outputs their eligibility for the Presidency, the Senate and the House. Validate that the input is within acceptable norms. E.g. Age must be less than x years old where x is a justifiable number.

Note: There are other requirements in order to be eligible to serve as President, Senator or Representative. Ensure that research is conducted to determine what all the requirements for eligibility are.

For the program:

  1. Create pseudocode called eligibilityPseudoCode.txt.
  2. Code the program as eligibility.py.
  3. Upload your pseudocode (eligibilityPseudoCode.txt) and your program (eligibility.py) to D2L.

Can anybody help me with this in terms of psuedocode and python programming?

Note: The version of Python that I use is Python 3.7

0 0
Add a comment Improve this question Transcribed image text
Answer #1

def congress( person_age, years_of_citizenship ):
   eligible_for_us_senator = False;
   eligible_for_us_representative = False;
  
   if( person_age >= 25 and years_of_citizenship >= 7):
       eligible_for_us_representative = True;
   if( person_age >= 30 and years_of_citizenship >= 9):
       eligible_for_us_senator = True;

   if( eligible_for_us_senator and eligible_for_us_representative ):
       return "Eligible for the Senate and the House";
   elif( eligible_for_us_representative ):
       return "Eligible only for the House";
   else:
       #if not eligible_for_us_representative, then also not eligible_for_us_senator
       return "Not eligible for Congress";

Add a comment
Know the answer?
Add Answer to:
There are eligibility requirements for a person to serve as President, Senator and Representative in the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Important: This code must be written without the use of <and> or range. Create the Congress...

    Important: This code must be written without the use of <and> or range. Create the Congress Program as Python program: A) A person is eligible to be a US senator if they are at least 30 years old and have been a US citizen for at least 9 years. B) To be a US representative these numbers are 25 and 7, respectively. C) They are not eligible for either if...? Your program will accept a person's age and years of...

  • I am writing a Python program to serve as a fitness tracker. I would love some...

    I am writing a Python program to serve as a fitness tracker. I would love some input as to how you would code this. I've included what I want this program to accomplish, what I will keep track of, and below all of that I have posted the assignment guidelines. Any suggestions on how to make this better/ more efficient would be welcome! I'm thinking of making a weekly tracker that takes input per day, and outputs at the end...

  • PROGRAM STATEMENT AND REQUIREMENTS: Great Tutors Inc. is a company that provides tutoring services to elementary...

    PROGRAM STATEMENT AND REQUIREMENTS: Great Tutors Inc. is a company that provides tutoring services to elementary school students. Parents bring their students after school to their offices where one tutor is assigned to each student. The same tutor is assigned to the student for every visit. A tutor teaches his/her assigned student for several hours and charges a flat rate per hour for any student. Each tutor can only teach for a maximum of 40 hours. The program must ask...

  • everything explain in the last pic i need a summer for the pags thank u workforce....

    everything explain in the last pic i need a summer for the pags thank u workforce. [3] Health Care in a Global Context HANDS OFF MY HEALTH CARET The United States is one of the world's only developed nations that does not guarantee universal health coverage for its citizens. (31) In 2005 the United States and the other member states of the World Health Organization signed the World Health Assembly resolution 58.33, [16] which stated that nations should "transition to...

  • FISCAL POLICY IN THEORY: March, 2020: we are on the verge of Congress and the President...

    FISCAL POLICY IN THEORY: March, 2020: we are on the verge of Congress and the President passing legislation that will empower the federal government to spend an unprecedented amount of EXTRA money not seen since World War 2 ---- in order to address the pandemic but also to help cushion the blow financially of perhaps ten or twenty million Americans --- or more --- losing their jobs, and thus suffering a drop in income. The scale of the 2020 recession...

  • Hi can you help me make a summary about this short article and how it could...

    Hi can you help me make a summary about this short article and how it could affect me economically as US citizen? Trump Pulls Back From Declaring a National Emergency to Fund a Wall Trump Says He’s Holding Off on National Emergency Declaration President Trump said it was up to Congress to break the impasse over a border wall that has led to a government shutdown.Published OnJan. 11, 2019CreditCreditSarah Silbiger/The New York Times By Annie Karni and Maggie Haberman Jan....

  • can someone please help me with an introduction paragraph and a summary of the whole article....

    can someone please help me with an introduction paragraph and a summary of the whole article. us. Trump Didn't Kill the Global Trade System. He Split It in Two. Allies find relations modestly tweaked despite the president's rhetoric, while relations with China are entering a deep freeze By Greg Ip Dec. 26, 2018 1136 am. ET When Donald Trump entered the White House on a platform of defiant nationalism nearly two years ago, many feared he would dismantle the global...

  • Actions that damage a company and its employees should be stamped out, everyone would agree. But ...

    Actions that damage a company and its employees should be stamped out, everyone would agree. But should the people responsible be stamped out, too? HBR CASE STUDY The Reign of Zero Tolerance by Ben Gerson "Mr. Pemberton?" manager. The guards had radioed her that the "Yes, that's me," Simon replied distractedly, his back turned. target wasn't putting up much resistance. "Your personal belongings will be messen The two burly gentlemen who had suddenly gered to your home later today," Sallie...

  • How can we assess whether a project is a success or a failure? This case presents...

    How can we assess whether a project is a success or a failure? This case presents two phases of a large business transformation project involving the implementation of an ERP system with the aim of creating an integrated company. The case illustrates some of the challenges associated with integration. It also presents the obstacles facing companies that undertake projects involving large information technology projects. Bombardier and Its Environment Joseph-Armand Bombardier was 15 years old when he built his first snowmobile...

  • Case: Enron: Questionable Accounting Leads to CollapseIntroductionOnce upon a time, there was a gleaming...

    Case: Enron: Questionable Accounting Leads to CollapseIntroductionOnce upon a time, there was a gleaming office tower in Houston, Texas. In front of that gleaming tower was a giant “E,” slowly revolving, flashing in the hot Texas sun. But in 2001, the Enron Corporation, which once ranked among the top Fortune 500 companies, would collapse under a mountain of debt that had been concealed through a complex scheme of off-balance-sheet partnerships. Forced to declare bankruptcy, the energy firm laid off 4,000...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT