Please help me write a program in Python.
This lab will use input, output and decisions – NO repetition or functions.
Your program will read the user’s name. Take any name they enter. It may be just a first name or a first and last name – it does not matter what they enter, you will take it all as their name.
Next your program will read the month the user was born. The month will be entered as an integer: 1 = January, 2 = February, etc. Make sure your prompt contains enough information so the user knows what to enter.
For this program you will use the following to decide which season to display:
12, 1, 2 = winter
3, 4, 5 = spring
6, 7, 8 = summer
9, 10, 11 = fall
You will also ask the user what year they were born and decide if this is a leap year or not.
To determine if a year is a leap year, use the following:
A year which is evenly divisible by 4 is a leap year except for century years (years ending with 00) which is a leap year only if it is evenly divisible by 400.
Your program must work for all years but you can test your code using the following years:
2012, 2004, 1968 are leap years
1971, 2006 are not leap years
1200, 1600, 2000, 2400 are leap years
1700, 1800, 1900 are not leap years
Your program will then display a greeting to the user and tell them which season they were born and whether it was a leap year or not. The content of your message is shown below.
For example:
The user enters their name is “Jim Pembry” and they were born in the month “6” and the year 1971. Your program should display this exact message:
Hello, Jim Pembry! You were born in the summer and 1971 was not a leap year.
Make sure you get the spacing and punctuation as shown.
NOTE – Violating any of the following will get you a 20 point deduction in your lab grade:
You will NEVER call main() more than once.
You will NEVER use break, exit, quit, stop, end, or anything to leave a loop, function, or other construct prematurely.
You will NEVER have a function call itself.
You will NEVER use global variables. However, you may use global “constants” if used properly.
You will have only one return statement in a function that returns one or more values.
Program descriptions should look similar to this:
############################################
# Your first and last name
# Which lab this is – Lab 1
# This program does this…… blah blah blah
############################################
Please use only simple Python programming concepts as this is for an intro level class. ” This lab will use input, output and decisions – NO repetition or functions.”
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more