1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mariarad [96]
4 years ago
8

Easter Sunday is the first Sunday after the first full moon of spring. To compute the date, you can use this algorithm, invented

by the mathematician Carl Friedrich Gauss in 1800: 1. Let y be the year (such as 1800 or 2001). 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 to 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. Then Easter falls on day p of month n. For example, if y is 2001:

Computers and Technology
1 answer:
tatuchka [14]4 years ago
5 0

Answer:

# The user is prompted to enter the year

# the entered year is assigned to y

y = int(input("Enter the year: "))

# the remainder when y is divided by 19 is assigned to a

a = y % 19

# The quotient is assigned to b when y is divided by 100

b = y // 100

# The remainder is assigned to c when y is divided by 100

c = y % 100

# The quotient is assigned to d when b is divided by 4

d = b // 4

# The remainder is assigned to e when b is divided by 4

e = b % 4

# The quotient is assigned to g when 8 * b + 13 is divided by 25

g = (8 * b + 13) // 25

# The remainder is assigned to h when 19 * a + b - d - g + 15 is divided by 30

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

# The quotient is assigned to j when c is divided by 4

j = c // 4

# The remainder is assigned to k when c is divided by 4

k = c % 4

# The quotient is assigned to m when a + 11 * h is divided by 319

m = (a + 11 * h) // 319

# The remainder is assigned to r when 2 * e + 2 * j - k - h + m + 32 is divided by 7

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

# The quotient is assigned to n when h - m + r + 90 is divided by 25

n = (h - m + r + 90) // 25

# The remainder is assigned to p when h - m + r + n + 19 is divided by 32

p = (h - m + r + n + 19) % 32

# The date of easter is displayed

print ("Easter falls on day ", p, "of month ", n);

Explanation:

The code is written in Python and is well commented. A sample image of program output is attached.

You might be interested in
Which osi layer is responsible for combining bits into bytes and bytes into frames?
Nastasia [14]
If you are breaking the computer down try in software it does change after a while
3 0
3 years ago
Write any four common hardware devices​
marishachu [46]

Answer:

Input devices: For raw data input.

Processing devices: To process raw data instructions into information.

Output devices: To disseminate data and information.

Storage devices: For data and information retention.

8 0
3 years ago
An authenticated user can add up to how many computer accounts to the domain, by default
Brums [2.3K]
By default, 10 computers can be joined to the domain by both users and administrators. As long as a user is authenticated against the Active Directory, he or she can add up to 10 computers to the domain.
While this one posses as an advantage for smaller companies, it is not a desirable feature for bigger companies since they have to control more tightly who can add machines to their domain.
7 0
4 years ago
Importance of project risk management
kkurt [141]
You must spread your risks out like don’t put all your eggs in one basket... don’t rely on on thing because is it goes downhill you have no backup
5 0
4 years ago
A ball is released from a 10 m high roof and bounces two thirds as high on each successive bounce. After traveling a total of 40
skelet666 [1.2K]

Answer:

Four times traveling 40,12345 mts

Explanation:

We can express this as a sum as follows

\sum_{i=1}^4(10\cdot  \frac{2}{3}^{i - 1} + 10\cdot  \frac{2}{3}^{i } ) = 3250/81=40.12345679

The first term is the dropping part and the second is the upward motion. this sums up to 40,12345 m after bouncing four times. As a program we could write using the while loop.

distance=0;

i:=0;

while distance<40 do

i:=i+1;

distance:=distance+ 10\cdot  \frac{2}{3}^{i - 1} + 10\cdot  \frac{2}{3}^{i };

end while;

Here the answer is in i and the closest distance traveled after reaching 40 is in the variable distance.

4 0
4 years ago
Other questions:
  • List five types of system information that can be obtained from the windows task manager. how can you use this information to co
    5·1 answer
  • In a set associative cache memory, if the number of ways (lines) in a set is doubled while keeping the cache size and line size
    13·1 answer
  • Given the following function definition, what modifications need to be made to the search function so that it finds all occurren
    7·1 answer
  • What is ana absolute adress
    11·1 answer
  • To update a bibliography field that is not contained in a ____, right-click the bibliography, and then click Update Field on the
    10·1 answer
  • ____ is the amount of effort (usually in hours) required to perform cryptanalysis on an encoded message so that it may be decryp
    8·1 answer
  • Samira recently opened an online potted plant store and needs to promote it. She chose Google Ads because it offers advertisers
    12·2 answers
  • What is difference between reserved and user defined word
    9·1 answer
  • During the first six months of his job, Enrique's boss gave him weekly feedback about his performance. What component of effecti
    9·1 answer
  • BRAINLIEST 14 points
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!