Created
April 2, 2020 08:45
-
-
Save C0NFR1NGO/100a2d5f7a4ef02d192461f15f2b5143 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Thu Apr 2 13:44:11 2020 | |
@author: shrey | |
""" | |
import datetime | |
a=input("Enter your card number:") | |
if a=="20147": | |
tday=datetime.date.today() | |
exp=datetime.date(2019,3,31) | |
val=exp-tday | |
if val.total_seconds()<0 : | |
print("Your card is invalid") | |
else : | |
print("Your card is valid") | |
if a=="54785": | |
tday=datetime.date.today() | |
exp=datetime.date(2020,3,30) | |
val=exp-tday | |
if val.total_seconds()<0 : | |
print("Your card is invalid") | |
else : | |
print("Your card is valid") | |
A | |
if a=="85742" : | |
now=datetime.datetime.now() | |
exp=datetime.datetime(2020,4,1,17,0,0,00) | |
val=exp-now | |
if val.total_seconds()<0 : | |
print("Your card is invalid") | |
else : | |
print("Your card is valid") | |
if a=="54654": | |
tday=datetime.date.today() | |
exp=datetime.date(2020,4,30) | |
val=exp-tday | |
if val.total_seconds()<0 : | |
print("Your card is invalid") | |
else : | |
print("Your card is valid") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
""" | |
import time | |
import datetime | |
F1=datetime.date(2010,3,17) | |
F2=datetime.date(2010,12,23) | |
F3=datetime.date(2009,2,5) | |
F4=datetime.date(2009,8,17) | |
today=datetime.date.today() | |
age_F1=(today-F1).total_seconds() | |
age_F2=(today-F2).total_seconds() | |
age_F3=(today-F3).total_seconds() | |
age_F4=(today-F4).total_seconds() | |
print("Ages in years") | |
print(age_F1/31556926) | |
print(age_F2/31556926) | |
print(age_F3/31556926) | |
print(age_F4/31556926) | |
x=age_F1/31556926 | |
y=age_F2/31556926 | |
z=age_F3/31556926 | |
a=age_F4/31556926 | |
if age_F1>age_F2: | |
list1 = y | |
list2 = x | |
else: | |
list1= x | |
list2 = y | |
if list2>age_F3: | |
list3=list2 | |
list2= z | |
else: | |
list3= z | |
if list3>age_F4: | |
list4=list3 | |
list3 = a | |
else: | |
list4=a | |
print("Age in Ascending order ") | |
time.sleep(1) | |
print(list1) | |
time.sleep(1) | |
print(list2) | |
time.sleep(1) | |
print(list3) | |
time.sleep(1) | |
print(list4) | |
time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment