Created
September 14, 2020 21:33
-
-
Save yazilimfuryasi/6f6c04fe0a357b4665154380bacb74f1 to your computer and use it in GitHub Desktop.
Kaç gün, saniye yaşadın?
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 datetime | |
print("Tarihi gün, ay, yıl olarak yazınız. Örn: 04.11.1993") | |
dogumTarihi = datetime.datetime.strptime(input("Tarih: "), "%d.%m.%Y") | |
yas = datetime.datetime.now().today() | |
sonuc = yas - dogumTarihi | |
print(f"{sonuc.days} Gün\n{sonuc.seconds} Saniye\n{sonuc.microseconds} Mikrosaniye") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment