Question

Write a program in python that computes the date of Easter Sunday for a specified year....

Write a program in python that computes the date of Easter Sunday for a specified year. 1.Ask the user for the year (such as 2001). Save the year in y. 2. Divide y by 19 and call the remainder a. Ignore the quotient. 3.Divide y by 100 to get a quotient b and a remainder c. 4.Divide b by 4 to get a quotient d and a remainder e. 5. Divide 8 * b + 13 by 25 to get a quotient g. Ignore the remainder. 6.Divide 19 * a + b - d - g + 15 by 30 t get a remainder h. Ignore the quotient. 7. Divide c by 4 to get a quotient j and a remainder k. 8. Divide a + 11 * h by 319 to get a quotient m. Ignore the remainder. 9. Divide 2 * e + 2 * j - k - h + m + 32 by 7 to get a remainder r. Ignore the quotient. 10. Divide h - m + r + 90 by 25 to get a quotient n. Ignore the remainder. 11. Divide h - m + r + n + 19 by 32 to get a remainder p. Ignore the quotient.

Homework Answers

Answer #1
y = int(input("Enter year: "))

a = y % 19
print("a =",a)

(b, c) = divmod(y,100)
print("b =",b)
print("c =",c)

(d, e) = divmod(b,4)
print("d =",d)

g = (8*b+13)//25
print("g =",g)

h = ( 19 * a + b - d - g + 15)%30
print("h =",h)

(j, k) = divmod(c,4)
print("j =",j)
print("k =",k)

m = (a + 11 * h)//7
print("m =",m)

r = ( 2 * e + 2 * j - k - h + m + 32) % 7
print("r =",r)

n = (h - m + r + 90)%25
print("n =",n)

p = (h - m + r + n + 19)%12
print("p =",p)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a complete program in C ++ to calculate the day Easter will fall on based...
Write a complete program in C ++ to calculate the day Easter will fall on based on these INTEGER equations by inputting the integer year and outputting the date of Easter. Y = Year read in N = Y - 1900 A = N - (N/19)*19 B = (7*A + 1)/19 C = 11*A + 4 - B M = C - (C/29)*29 Q = N/4 S = N + Q + 31 - M W = S - (S/7)*7...
Write a C++ program to demonstrate thread synchronization. Your main function should first create a file...
Write a C++ program to demonstrate thread synchronization. Your main function should first create a file called synch.txt. Then it will create two separate threads, Thread-A and Thread-B. Both threads will open synch.txt and write to it. Thread-A will write the numbers 1 - 26 twenty times in nested for loops then exit. In other words, print 1 - 26 over and over again on separate lines for at least 20 times. Thread-B will write the letters A - Z...
Write a program of wordSearch puzzle that use the following text file as an input. The...
Write a program of wordSearch puzzle that use the following text file as an input. The output should be like this: PIXEL found (left) at (0,9). ( Use JAVA Array ) .Please do not use arrylist and the likes! Hints • The puzzle can be represented as a right-sized two-dimensional array of characters (char). • A String can be converted into a right-sized array of characters via the String method toCharArray. . A word can occur in any of 8...
C program fractions.c that does the following: 1. The program starts by making the user enter...
C program fractions.c that does the following: 1. The program starts by making the user enter a non-negative integer number a, called the first numerator. If the user enters a negative number, the program repeats the entry. 2. The program then makes the user enter a positive integer number b, called the first denominator. If the user enters a non-positive number, the program repeats the entry. 3. The program then makes the user enter a non-negative integer number c, called...
Given that A to Z are mapped to integers 0-25 as follows. A:0, B:1, C:2, D:3,...
Given that A to Z are mapped to integers 0-25 as follows. A:0, B:1, C:2, D:3, E:4, F:5, G:6, H:7, I: 8, J: 9, K:10, L:11, M:12, N:13, O:14, P:15, Q:16, R:17, S:18, T:19, U:20, V:21, W:22, X:23, Y:24, Z:25. Encrypt the following message using Vigenere Cipher with key: CIPHER THISQUIZISEASY What is the ciphertext? Show your work. PLEASE HELP
Here are two relations: R(A,B): {(0, 1), (2,3), (0, 1), (2,4), (3,4)} S(B, C): {(0, 1),...
Here are two relations: R(A,B): {(0, 1), (2,3), (0, 1), (2,4), (3,4)} S(B, C): {(0, 1), (2, 4), (2, 5), (3, 4), (0, 2), (3, 4)} Compute the following: a) 11'A+B.A2,B2(R); b) 71'B+l,C-l(S); c) TB,A(R); d) TB,c(S); e) J(R); f) J(S); g) /A, SUM(Bj(R); h) IB.AVG(C)(S'); ! i) !A(R); ! j) IA,MAX(C)(R t:><1 S); k) R ~L S; I) R ~H S; m) R ~ S; n) R ~R.B<S.B S. I want to know the solution for j to m
Ciphertext WHKCJILXI was encrypted by affine cipher C = A*P + 8 (mod 26), where parameter...
Ciphertext WHKCJILXI was encrypted by affine cipher C = A*P + 8 (mod 26), where parameter A is uknown. You have a following additional information: plaintext letter L was encrypted by letter H. Find A and decrypt the message. You can use applet for decryption. For your convenience, below are numeric values of ENGLISH letters: A=0 B=1 C=2 D=3 E=4 F=5 G=6 H=7 I=8 J=9 K=10 L=11 M=12 N=13 O=14 P=15 Q=16 R=17 S=18 T=19 U=20 V=21 W=22 X=23 Y=24...
QUESTION 19 A key distribution and authentication method used by every operating system. It uses a...
QUESTION 19 A key distribution and authentication method used by every operating system. It uses a shared secret key and can also be used for single sign-on operations. 2 points    QUESTION 20 Authentication method that allows a user to authenticate once and use multiple services without having to re-authenticate. 2 points    QUESTION 21 Protocol that establishes the security association for the Authentication Header (AH) or the Encapsulating Security Payload (ESP) in IPsec, and provides keys for both AH...
Read the following cases and decide the right supplement for each case. Highlight the supplement name...
Read the following cases and decide the right supplement for each case. Highlight the supplement name by finding the word from the given box. Follow the given example: Example: Naif has an infection. He needs an antibiotic Maryam cannot digest milk. She needs to have ___lactase______ supplements Majid is overweight. He decided to buy _________ supplements to help him lose weight. Muntaha’s nails always breaks so easily. She wants to get _________ supplements. Munther face looks older than his age....
pseudocode please!! Assignment6C: P0\/\/|\|3D. In the early 80s, hackers used to write in an obfuscated, but...
pseudocode please!! Assignment6C: P0\/\/|\|3D. In the early 80s, hackers used to write in an obfuscated, but mostly readable way called “leet” – short for “elite”. In essence, it was a simple character replacement algorithm, where a single “regular” character was replaced by one or more “leet” characters; numbers remained the same. Here’s one of the most readable versions: a 4 g 9 m /\\/\\ s $ y ‘/ b B h |-| n |\\| t 7 z Z c (...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT