Δημοσιεύτηκε: 30 Μάιος 2011, 20:37
από M.Jackson
Σήμερα έμαθα την Python και είναι ωραία γλώσσα.

Κώδικας: Επιλογή όλων
#! /usr/bin/python3
# Filename: pro.py

x = int(input("Enter today day: "))
y = int(input("Enter today month: "))
z = int(input("Enter today year: "))

print ("Thank you now enter your birthday to continue...")

x2 = int(input("Entery day: "))
y2 = int(input("Entery month: "))
z2 = int(input("Entery year: "))

day = abs(x - x2)
month = abs(y - y2)
year = z - z2

print("Είστε {0} χρονών, {1} μηνών, {2} ημερών!".format(year, month, day))

Off topic:
Ξεκινάω με τις κλασικές-απλές ασκήσεις για εξάσκηση και να κατανοήσω την γλώσσα :)