Created
July 16, 2022 10:51
-
-
Save kadirmalak/5326955abe9fb3aaa9d755611f630010 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
from datetime import date | |
name1 = "kadir" | |
name2 = "hasan" | |
name3 = "osman" | |
x = 3 # int | |
def get_logged_in_user(app): | |
if app == "web": | |
return "[email protected]" | |
else: | |
return "kadir" # string | |
def print_hello(name): | |
print("hello", name) | |
#user = get_logged_in_user("web") | |
#print_hello(user) | |
text = input("Please enter your birth year: ") | |
birth_year = int(text) | |
print("birth year:", birth_year) | |
def calculate_age(current_year, year_of_birth): | |
# please only pass integers | |
return current_year - year_of_birth | |
def print_age(age): | |
if age > 40: | |
print("40'in ustu yaslidir ya") | |
elif age > 30: | |
print("???") # burada hangi aralik var? | |
else: | |
print("yasiniz:", age) | |
current_year = date.today().year | |
age = calculate_age(current_year, birth_year) | |
print_age(age) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment