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 citizenship as inputs. Your outputs will be one of the following: You are eligible to be a Senator or a Representative. You are eligible to be a Representative. You are not eligible to run for Congress.
Hello, here is the completed code you wanted. Every important statement is explained using comments. Please check and let me know if you have any doubts. Thanks.
CODE
#main function
def main():
#prompt for age
age = int(input("Enter your age: "))
#prompt for years of citizenship
citizenship = int(input("Enter your years of
citizenship: "))
#if age is greater than or equals 30
if age >= 30:
#if citizenship is greater than or
equals 9
if citizenship >= 9:
print("You are
eligible to be a Senator or a Representative.")
#if citizenship is greater than or
equals 7 and less than 9
elif citizenship >= 7:
print("You are
eligible to be a Representative.")
#if citizenship is less than
7
else:
print("You are
not eligible to run for Congress.")
#if age is greater than or equals 25 and less than
30
elif age >= 25:
#if citizenship is greater than or
equals 7
if citizenship >= 7:
print("You are
eligible to be a Representative.")
#if citizenship is less than
7
else:
print("You are
not eligible to run for Congress.")
#if age less than 25
else:
print("You are not eligible to run
for Congress.")
#calling main function
main()
OUTPUT

CODE SCREEN SHOT

Important: This code must be written without the use of <and> or range. Create the Congress...
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...
Write in python code
Project 11-1: Birthday Calculator Create a program that accepts a name and a birth date and displays the person's birthday the current day, the person's age, and the number of days until the person's next birthday Console Birthday Calculator Enter name: Joel Enter birthday (MM/DD/YY): 2/4/68 Birthday: Sunday, February 04, 1968 Today: Joel is 48 years old. Joel's birthday is in 73 days Tuesday, November 22, 2016 Continue? (y/n): y Enter name: Django Enter birthday (MM/DD/YY):...
In this lab, you use the pseudocode in figure below to add code
to a partially created Python program. When completed, college
admissions officers should be able to use the Python program to
determine whether to accept or reject a student, based on his or
her class rank.
Summary In this lab, you use the pseudocode in figure below to add code to a partially created Python program. When completed, college admissions officers should be able to use the Python...
+ Run C Code IMPORTANT: • Run the following code cell to create the input file, biostats.csv, which you will be using later. 74, In [ ]: N %%file biostats.csv Name, Sex, Age, Alex, M, 41, Bert, M, 42, Dave, M, 39, Elly, F, 30, Fran, F, 33, Jake, M, F, Luke, M, 34, F Myra, M, M, 38, Ruth, F, 28, 22 22 323 47 47, Height, Weight 170 200 167 70 115 143 139 280 98 75, 350...
This needs to be written in Python. I'm writing this but I'd love to see how others would do it. I have idea to make a program to keep track of reading. Set goal per day. Input minutes per day & book read. Could accumulate for whole month. Input daily, but you can input it all at the end of the week if you want. I want the user to be prompted to enter a numerical value and book for...
given code:
assignment:
use
python to extend the given code to create an output similar to the
one in the black box
please explain the final code
import random HALMst N in = int(input('Enter Total Number of Cards: ") NM in NOON A = [] B [] E - [] D = [] E = [] for i in range(1, n+1): A.append(i) D.append(i) E.append(i) for j in range(n): 8.append(random.choice(D)) D.remove(B[5]) C.append(random.choice(E)) E.remove(C[j]) c= 0 for k in range(n): if (Brkl...cikl):...
Please write this code in JAVA lang., thank you! Your spouse's cousin's nephew's dog's trainer's best friend owns a restaurant. That person is very bad at math and recently discovered that most customers have been significantly undercharged for meals. You have been approached to create a computer program that will accurately calculate bills for each customer. Kids, under 5, eat free. Teens and seniors get a 25% discount. Also, Food and beverage is taxed at 5%. No tax for anything...
Please write this code in JAVA lang., thank you! Your spouse's cousin's nephew's dog's trainer's best friend owns a restaurant. That person is very bad at math and recently discovered that most customers have been significantly undercharged for meals. You have been approached to create a computer program that will accurately calculate bills for each customer. Kids, under 5, eat free. Teens and seniors get a 25% discount. Also, Food and beverage is taxed at 5%. No tax for anything...
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...
Written in Python In this lab, you are to build a trivia game. The game should present each question – either in order or randomly – to the player, and display up to four possible answers. The player is to input what they believe to be the correct answer. The game will tell the player if they got it right or wrong and will display their score. If they got it right, their score will go up. If they got...