Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 04_Day_Strings/day_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@

radius = 10
pi = 3.14
area = pi # radius ## 2
area = pi * radius ** 2
result = 'The area of circle with {} is {}'.format(str(radius), str(area))
print(result) # The area of circle with 10 is 314.0

Expand Down
7 changes: 4 additions & 3 deletions 05_Day_Lists/day_5.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
animal_products = ['milk', 'meat', 'butter',
'yoghurt'] # list of animal products
web_techs = ['HTML', 'CSS', 'JS', 'React', 'Redux',
'Node', 'MongDB'] # list of web technologies
'Node', 'MongoDB'] # list of web technologies
countries = ['Finland', 'Estonia', 'Denmark', 'Sweden', 'Norway']

# Print the lists and it length
Expand Down Expand Up @@ -164,13 +164,14 @@
print(fruits.index('orange')) # 1
ages = [22, 19, 24, 25, 26, 24, 25, 24]
print(ages.index(24))

# Reverse
fruits = ['banana', 'orange', 'mango', 'lemon']
fruits.reverse()
print(fruits.reverse())
print(fruits)
ages = [22, 19, 24, 25, 26, 24, 25, 24]
ages.reverse()
print(ages.reverse())
print(ages)

# sort
fruits = ['banana', 'orange', 'mango', 'lemon']
Expand Down