Question

Python assignment:  Write a program that asks for the user's age. Based on their response print "You...

Python assignment:  Write a program that asks for the user's age. Based on their response print "You can vote" (18 years old or older) or "You can't vote" and also whether or not he/she is a senior citizen (over 64). If senior citizen print "You're a Senior Citizen...you deserve two votes"!   Use the Idle editor and don't forget the .py extension. Good luck.

         Your python program will be graded on the following:

    Execution of the program gives the correct results

    Documentation at the top

#File:
#Name:
#Start Date:
#Purpose

Variables should be meaningful. Example: Use Quarters instead of Q!

Make sure you include the following code so the output of your program will remain on the screen until the user hits return.

endofprogram = input("Please hit enter to exit from this program:")

  

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Python assignment:  Write a program that asks for the user's age. Based on their response print "You...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • What is wrong with my python code. I am receiving this error: Traceback (most recent call...

    What is wrong with my python code. I am receiving this error: Traceback (most recent call last): File "C:/Users/owner/Documents/numberfive.py", line 7, in if age > 18: TypeError: unorderable types: str() > int() My code is age= input("Enter your age:") if age > 18: print("You can vote.") else: print("You can't vote.") if age > 64: print ("You're a Senior Citizen...you deserve two votes") endofprogram = input("Please hit enter to exit from this program:")

  • In this assignment you are asked to write a python program to maintain the Student enrollment...

    In this assignment you are asked to write a python program to maintain the Student enrollment in to a class and points scored by him in a class. You need to do it by using a List of Tuples What you need to do? 1. You need to repeatedly display this menu to the user 1. Enroll into Class 2. Drop from Class 3. Calculate average of grades for a course 4. View all Students 5. Exit 2. Ask the...

  • Python Write a program that asks the user for a zip code and converts it to...

    Python Write a program that asks the user for a zip code and converts it to a postal bar code. A postal bar code uses two types of lines long and short. Since we can't print "long line” we will use: 0 - short line 1 - long line. The digits are represented by bars as explained in the below chart Value Encoding 1 00011 2 00101 00110 01001 01010 01100 10001 8 10010 9 10100 0 11000 The bar...

  • -----------Python program------------------- Instructions: For this assignment, you will write complete a program that allows a customer...

    -----------Python program------------------- Instructions: For this assignment, you will write complete a program that allows a customer to plan for retirement. Part 2: Generate a Retirement Planning Table: It's hard to decide how much you need to save for retirement. To help your customer visualize how long her nest egg will last, write a program that allows the user to generate a retirement planning table showing the number of months the savings will last for various combinations of starting account balance...

  • Assignment Overview In Part 1 of this assignment, you will write a main program and several...

    Assignment Overview In Part 1 of this assignment, you will write a main program and several classes to create and print a small database of baseball player data. The assignment has been split into two parts to encourage you to code your program in an incremental fashion, a technique that will be increasingly important as the semester goes on. Purpose This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of...

  • Python program This assignment requires you to write a single large program. I have broken it...

    Python program This assignment requires you to write a single large program. I have broken it into two parts below as a suggestion for how to approach writing the code. Please turn in one program file. Sentiment Analysis is a Big Data problem which seeks to determine the general attitude of a writer given some text they have written. For instance, we would like to have a program that could look at the text "The film was a breath of...

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
ADVERTISEMENT