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

How do I get an equation from 9x-y=45 but the equation has to equal y
What is a third variable condition that could create the following correlation? The popularity of online job portals is correlated to the number of people chang
Some investments in the stock market have earned 10% annually. At this rate , earnings can be found using the formua A=P(1.10)^n, where A is the total value of
How can water play a role in chemical weathering
the core of an atom is the a. neutron. b. electron. c. nucleus.
find the value (64)3/2
one of the reasons for studying history is that it tells who we are and where we have been. a. true b. false
the formula for the area of a triangle is a =1/2 bh, where b is the length of the base and h is the height. the equation solved for h is h =2a/b . find the heig
what supplies the energy for muscle contraction? glucose oxygen atp glycogen
how many zeros are in 30,000