Python Programming: An Introduction to Computer Science
Python Programming: An Introduction to Computer Science
3rd Edition
ISBN: 9781590282779
Author: John Zelle
Publisher: Franklin Beedle & Associates
bartleby

Videos

Question
Book Icon
Chapter 7, Problem 10PE
Program Plan Intro

Print the date of Easter

Program plan:

  • Define the function “easter()”,
    • Check whether the year lies between “1900” and “2099”,
      • If it is true, calculate the value of “a”, “b”, “c”, “d”, and “e” using the formula.
      • Check whether the sum of "d” and “e” is greater than “9”,
        • If it is true, check whether the year is either “1954” or “1981” or “2049” or “2076”,
          • If it is true, subtract 7 days from “d’ value and print the date of Easter one week too late on April.
        • Otherwise, print the date of Easter on April.
        • Otherwise, check whether the year is either “1954” or “1981” or “2049” or “2076”,
          • If it is true, subtract 7 days from “d’ value and print the date of Easter one week too late on March.
        • Otherwise, print the date of Easter on March.
      • Otherwise, print the message as “Year is out of range”.
  • Define the function “main()”,
    • Get the year from the user.
    • Call the function “easter()”.
  • Call the function “main()”.

Blurred answer
Students have asked these similar questions
The term color tone refers to the "temperature" of a photo.​ Question 17Select one: True False
You cannot add 3-dimensional effect​s to a shape. Question 18Select one: True False
Which gallery shows available shapes for WordArt text? Question 10Select one: a. Transform b. Shape Styles c. Themes d. WordArt Styles
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
What Are Data Types?; Author: Jabrils;https://www.youtube.com/watch?v=A37-3lflh8I;License: Standard YouTube License, CC-BY
Data Types; Author: CS50;https://www.youtube.com/watch?v=Fc9htmvVZ9U;License: Standard Youtube License