Skip to content

Commit c4f9e2a

Browse files
committed
first 5
1 parent d9a4e02 commit c4f9e2a

File tree

11 files changed

+49
-5
lines changed

11 files changed

+49
-5
lines changed

.learn/resets/01-hello-world/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Your code here
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
my_list = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']
2+
3+
# 1. Print the 3rd item here
4+
5+
# 2. Change the value of 'thursday' to None
6+
7+
# 3. Print that position now here
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
my_list = [4,5,734,43,45,100,4,56,23,67,23,58,45,3,100,4,56,23]
2+
3+
# Print in the console the 1st element on the list
4+
5+
# Print in the console the 4th element on the list
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# import the random package here "import random"
2+
import random
3+
4+
def generate_random_list():
5+
aux_list = []
6+
randonlength = random.randint(1, 100)
7+
8+
for i in range(randonlength):
9+
aux_list.append(randonlength)
10+
i += i
11+
return aux_list
12+
13+
my_stupid_list = generate_random_list()
14+
15+
# Write your code below this comment, good luck!
16+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Remember to import random function here
2+
3+
my_list = [4, 5, 734, 43, 45]
4+
5+
# The magic goes below
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Your code here, have fun:

exercises/01-hello-world/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
# Your code here
2+
print("Hello World")
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
my_list = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']
22

33
# 1. Print the 3rd item here
4-
4+
print(my_list[2])
55
# 2. Change the value of 'thursday' to None
6-
6+
my_list[4] = None
77
# 3. Print that position now here
8+
print(my_list[4])

exercises/01.2-Retrieve-items/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
my_list = [4,5,734,43,45,100,4,56,23,67,23,58,45,3,100,4,56,23]
22

33
# Print in the console the 1st element on the list
4-
4+
print(my_list[0])
55
# Print in the console the 4th element on the list
6+
print(my_list[3])

exercises/01.3-Print-the-last-one/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ def generate_random_list():
1313
my_stupid_list = generate_random_list()
1414

1515
# Write your code below this comment, good luck!
16-
16+
the_last_one = my_stupid_list[-1]
17+
print(the_last_one)

0 commit comments

Comments
 (0)