-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDay3.py
72 lines (38 loc) · 1.04 KB
/
Day3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Mehmet SAMUR aka 'Yves Xavier'
# This is easy way to learn python Day 3.
# Tuples
# Tuples are unique elements and unchangeable
coorditanes = (4,5)
coordinates[1] = 10
print(coorditanes)
'''
It will give an error, using square paranthesis make them Tuples,
if you wanna create a list use open-close paranthesis.
Using square paranthesis out of the Tuples it allows us to change Tuples
'''
coordinates = [(1,3) , (5,90) , (5,7) , (9,6) , (4,8) , (15,16) , (23,42)]
coordinates[1] = 3,7 #It allows us to change index 1.
print(coordinates)
#Functions
def name():
print(name + " Hello")
# Return Statement
def cub(num):
return num*num*num
print(cub(9))
# If Statements.
is_male : False
if is_male:
print("You are a male.")
else:
print("You are a female.")
#If Statements & Comparisons
def max_num(num1 , num2 , num3):
if num1 >= num2 and num1 >= num3:
return num1
elif num2 >= num1 and num2 >= num3:
return num2
else:
return num3
print(max_num(999,88989,9997))
# See you Day 4.