Write a Python script that allows the user to enter a number

Assignment Help Python Programming
Reference no: EM132285355

Introduction to Programming Assignment -

To get started: Create a new folder cs104PA1.

Leap Year

As the earth orbits around the sun, it takes 365 and one-quarter days to complete an orbit. To make the adjustment for the quarter day, we add one day every 4 years to the calendar and that's the origin of the leap year. However, in so doing, there is a slight error that creeps in and to compensate for this error, years those are divisible by 100, but not by 400 are not considered leap years.

So, to summarize the definition of a leap year:

  • If a number is not divisible by 4, it is not a leap year.
  • If a number is divisible by 100 but not by 400, it is not a leap year.
  • If a number is divisible by 100 and 400, it is a leap year.
  • If a number is not divisible by 100 but divisible by 4, it is a leap year.

You have to write a Python script that allows the user to enter a number greater than 100 as the year and print a message saying whether it is a leap year or not. Note that, if the user enters a number less than or equal to 100, then your program should display an error message.

Shoppers Paradise -

Shoppers paradise wants an application that displays the number of reward points a customer earns each month. The rewards points are based on the customer's membership type and total monthly purchases amount as follows:

Membership Type

basic

standard premium

Write a complete Python monthly purchases amount integer. The user interface of your script may look like as follows: Save your script as "PA1_Question2.py" in the cs104PA1 folder.

Documentation and style -

The file should begin with a descriptive comment explaining what it is for.

Use meaningful names for variables.

Use helpful prompts when asking the user to enter values.

Provide a meaningful description as part of the output.

Do not worry about formatting the number of decimal places in the output.

Attachment:- Assignment File.rar

Reference no: EM132285355

Questions Cloud

Discuss various aspects : Discuss various aspects, advantages, disadvantages, application scenarios, comparison, etc.. of the RAD model.
Create an external assessment report : As a senior executive of LinkedIn, you have been asked to create an external assessment report as to the threat posed by Facebook,
Equipment and servers in particular : Why is it si important to keep track of who had access to the equipment and servers in particular
About organisation for economic co-operation and development : Describe about Organisation for Economic Co-operation and Development (OECD)? What is the main Objectives of the OECD?
Write a Python script that allows the user to enter a number : COMS 104 Introduction to Programming Assignment, Iowa State University, USA. Write a Python script that allows the user to enter a number greater than 100
Understanding the science behind change : Case 4: Blue cross and blue shield, and other: understanding the science behind change. page 521
What did it mean in the century european context : We often here the term "Imperialist" bandied about these days. What did it mean in the 19th-century European context?
Understanding the science behind change : Case 4: Blue cross and blue shield, and other: understanding the science behind change.
Biasing effect of reference points : The chapter identifies three steps of making a risky choice free of the biasing effect of reference points. What are these three steps?

Reviews

len2285355

4/16/2019 10:04:39 PM

Submission - Submit a zip file containing ONLY the files PA1_Question1.py and PA1_Question2.py via the Programming Assignment 1 Submission link in Canvas. Software Requirement - For those who are using personal Computer/Laptop required to install Python 2.7 interpreter. Be sure you get VERSION 2.7.x, not VERSION 3.

len2285355

4/16/2019 10:04:33 PM

Important: NO LATE ASSIGNMENT WILL BE ACCEPTED without a valid reason. Feel free to talk to the instructor or a TA if you need any help to complete the assignments. SOLUTIONS SHOULD BE ORIGINAL AND INDEPENDENTLY DEVELOPED. No consultation of other people's solutions is permitted. No sharing of answers is permitted. Assistance by others (except the instructor or TAs. Please start the programming assignment as soon as possible and get your questions answered early!

Write a Review

Python Programming Questions & Answers

  Calculate the accuracy of your linear classifier

Plot X,Y and the decision boundary. Make sure that you use a good plotting technique so that it is easy to distinguish which datapoint is X and which is Y. Calculate the accuracy of your linear classifier.

  Create a cheat commands in the game

Create a cheat commands in the game so player can pick up any item he wants from any location in the map - Display all possible actions you can carry out in game.

  Write a program that produces a comparison of the balance

Write a program that produces a comparison of the balance of a bank account over time between simple, monthly and daily methods of compounding interest.

  Write the python code for the problems

Topic: CS and Math. Write the python code for the following problem. Implement the modified Cholesky's algorithm by integrating

  Display the future day of the week using python code

Python only please. Write a program that prompts the user to enter an integer for today's day of the week

  How to read a html file using python

How to read a html file using python, then extract id and links in that file.

  Write a function named init that takes one argument

Write a function named init that takes one argument, a tuple of the proper length, and returns an tuple initialized as described above.

  Python project description

Grep all required data listed from the 1) to 7) and construct required run file for each step (pnr, drc, lvs, syn, pwr)based upon the choice of technology and process when executing your script.

  Create a print command to output each variable

Write a Python script that meets the following requirements: declares three variables: GPA (floating-point number), studentName ( a string), studentNumber.

  Same directory as your program

In the same directory as your program, create a file FF1, and write into it Hello (with a space at teh end). Similarly, create a file FF2, and write into it world! (with a new line, i.e., an ENTER at the end). And create a file DD and write into i..

  Write a python script for the ice cream ordering system

ICT702 : Write a Python script for the ice cream ordering system.Your program must store the prices of the individual items (cones, scoop flavours and toppings)

  Write a python program that generates a small web site

ICT112 Assignment - Generated Web Site for Sports Club. Your task is to write Python program that generates small web site for local sports club

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd