diff --git a/exercises/01-hello-world/app.py b/exercises/01-hello-world/app.py index 9e9f9126..dff86958 100644 --- a/exercises/01-hello-world/app.py +++ b/exercises/01-hello-world/app.py @@ -1 +1,3 @@ # On the next line, use Python's print function to say `Hello World` in the console (this exercise is case-sensitive!) + +print("Hello World") diff --git a/exercises/01.1-Access-and-Retrieve/app.py b/exercises/01.1-Access-and-Retrieve/app.py index c215ca3f..eef3de8d 100644 --- a/exercises/01.1-Access-and-Retrieve/app.py +++ b/exercises/01.1-Access-and-Retrieve/app.py @@ -5,4 +5,7 @@ # 2. change the position were 'thursday' is to None -# 3. print that position now here \ No newline at end of file +# 3. print that position now here + +my_list[4] = 'None' +print(my_list[4]) \ No newline at end of file diff --git a/exercises/01.2-Retrieve-items/app.py b/exercises/01.2-Retrieve-items/app.py index 86a1cbc5..f1a26439 100644 --- a/exercises/01.2-Retrieve-items/app.py +++ b/exercises/01.2-Retrieve-items/app.py @@ -2,4 +2,9 @@ # Print in the console the 1st element on the list -# Print in the console the 4th element on the list `spanish_translations` \ No newline at end of file +# Print in the console the 4th element on the list `spanish_translations` + + + +print(my_list[0]) +print(my_list[3]) \ No newline at end of file diff --git a/exercises/01.3-Print-the-last-one/app.py b/exercises/01.3-Print-the-last-one/app.py index a9a794ce..1cf019d0 100644 --- a/exercises/01.3-Print-the-last-one/app.py +++ b/exercises/01.3-Print-the-last-one/app.py @@ -10,5 +10,9 @@ def generate_random_list(): i += i return aux_list my_stupid_list = generate_random_list() +the_last_one = len(my_stupid_list) + +print(my_stupid_list) +print(the_last_one) # Feel happy to write the code below this comment, good luck!: diff --git a/exercises/01.4-Add-item-to-list/app.py b/exercises/01.4-Add-item-to-list/app.py index a0ba2ac1..74b509e3 100644 --- a/exercises/01.4-Add-item-to-list/app.py +++ b/exercises/01.4-Add-item-to-list/app.py @@ -1,5 +1,15 @@ #Remember import random function here: +import random +#The magic is here: -my_list = [4,5,734,43,45] +def generate_random_items(): + my_list = [] + adding = random.randint(0, 1) -#The magic is here: + for i in range(0, 10(my_list)): + my_list.append(adding) + i += i + return my_list + +my_stupid_list = generate_random_items() +print(my_stupid_list)