Answer:
def leap_year(y):
if y % 4 == 0:
return 1
else:
return 0
def number_of_days(m,y):
if m == 2:
return 28 + leap_year(y)
elif m == 1 or m == 3 or m == 5 or m == 7 or m == 8 or m ==10 or m == 12:
return 31
elif m == 4 or m == 6 or m == 9 or m == 11:
return 30
def days(m,d):
if m == 1:
return 0 + d
if m == 2:
return 31 + d
if m == 3:
return 59 + d
if m == 4:
return 90 + d
if m == 5:
return 120 + d
if m == 6:
return 151 + d
if m == 7:
return 181 + d
if m == 8:
return 212 + d
if m == 9:
return 243 + d
if m == 10:
return 273 + d
if m == 11:
return 304 + d
if m == 12:
return 334 + d
def days_left(d,m,y):
if days(m,d) <= 60:
return 365 - days(m,d) + leap_year(y)
else:
return 365 - days(m,d)
print("Please enter a date")
day=int(input("Day: "))
month=int(input("Month: "))
year=int(input("Year: "))
choice=int(input("Menu:\n1) Calculate the number of days in the given month.\n2) Calculate the number of days left in the given year.\n"))
if choice == 1:
print(number_of_days(month, year))
if choice == 2:
print(days_left(day,month,year))
Explanation:
Hoped this helped
Answer:
D.
The player uses a joystick to control the character.
Explanation:
The MEANING of operation is: "The fact or condition of functioning or being active."
This explains that the answer is D because you are using the joystick to control the character. Hope the helps.
Answer:
2 + 6 in programming is an example of math. It is the same as in the real world. Plus signs in coding are also a form of <em>string concatenaction,</em> the term used for combining two strings into one, or a variable into a string.
A type of encoding that involves relating new information to existing knowledge that you already have stored in long-term memory is: Semantic encoding.
Encoding can be defined as a communication process in which the sender of a message transforms an information into an encrypted message, in the form of notable symbols that represent ideas or concepts.
Generally, a message that has been encoded by a sender requires a decoding action by the recipient, in order for the communication process to be complete.
Semantic encoding is a type of encoding which typically involves the relation of new information with respect to an existing knowledge that has been stored in long-term memory.
In conclusion, semantic encoding deals with the encoding of meaning from new information rather than perceptual characteristics such as the meaning of words in English language.
Read more: brainly.com/question/24113575
Answer:
The source code has been attached to this response. It contains comments explaining each line of the code. Kindly go through the comments.
To run this program, ensure that the file is saved as ArithmeticProcessor.java
Keep editing line 7 of the code to test for other inputs and arithmetic operation.
A sample output has also been attached to this response.