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

Substance abuse issues and healthy alternatives
Which of the following is true regarding the solutions to the logarithmic equation below? 2 log Subscript 3 Baseline (x) = 4. log Subscript 3 Baseline (x square
Question 19 Which of the following is true of mutations? mutations can cause genetic disorders mutations may not change the protein mutations may change a trait
PLZZZZ HELPPP!!! points !!Only 4 QUESTIONS!! Article is about Walt Disney !! Quiz 1 Which statement would be MOST important to include in a summary of the artic
A company manufactures handband a wirleless
PART B: Which TWO details from the text best support the answer to Part A?A.“...they did not follow the exercise's rules or made mistakes.” (Paragraph 2)B.“...a
If 12 is equal to 6 plus X then what is X to the 2nd power.
you need to slack four bucks for a list of nine to read for your research project. How many ways can you choose for books to read
4y -3 Please help me
Need help with this geometry