BrainyBeauty1217 BrainyBeauty1217
  • 20-11-2020
  • Computers and Technology
contestada

(On Python/ Edhesive) Test if a date is a payday based on the day of the month (15th or the 30th).

Sample Run
Enter today's day numerically: 17
Sorry, not a payday.
Enter today's day numerically: 30
It's payday!

Respuesta :

vfxdead
vfxdead vfxdead
  • 20-11-2020

Answer:

day = input("Enter today's day numerically: ")

if "15" in day or "30" in day:

print("It's payday!")

else:

print("Sorry, not a payday.")

Explanation:

Ask the user what day it is and store it in a variable called, day. Write a simple if else statement to check if ut is payday or not. This program can be more advanced by having payday be a variable.

Answer Link

Otras preguntas

Mark all the statements that are true. A. The range for this function set (3) B. All real numbers are in the range of this function C. This graph is not a func
Show all work and explain in words Findthe value of x. Then find the measure of each labeled angle.
gains women made under the New Deal:
Help on this please
What is the answer to this?
What was one effect of the actions taken by Senator Joseph McCarthy and the House Un-American Activities Committee?
i need help with this please help me
Which is a simplified form of the expression -7y – (2y + 4)? A. -9y + 4 B. -9y – 4 C. -5y – 4 D. -5y + 4
A sign company is building a sign with the dimensions shown.10 ft13 ftWhat is the area, in square feet, of the sign?​
Which situation is the best example of a conflict in Judith Ortiz Cofer's "Gravity"? A. character struggles to survive poverty. B. character struggles to beco