Computer Science

Write a program to read today's date (only del part) from user. Then display how many days are left in the current month.

Python

Python Funda

96 Likes

Answer

day = int(input("Enter day part of today's date: "))
totalDays = int(input("Enter total number of days in this month: "))
daysLeft = totalDays - day
print(daysLeft, "days are left in current month")

Output

Enter day part of today's date: 16
Enter total number of days in this month: 31
15 days are left in current month

Answered By

43 Likes


Related Questions