Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 95d24ed

Browse files
committed
Correcciones curso intermedio
1 parent ffe8aad commit 95d24ed

File tree

5 files changed

+6
-20
lines changed

5 files changed

+6
-20
lines changed

Intermediate/02_challenges.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
def fizzbuzz():
1717
for index in range(1, 101):
1818
if index % 3 == 0 and index % 5 == 0:
19-
print("fizzbuz")
19+
print("fizzbuzz")
2020
elif index % 3 == 0:
2121
print("fizz")
2222
elif index % 5 == 0:

Intermediate/03_lambdas.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,13 @@
22

33
### Lambdas ###
44

5-
def sum_two_values(
6-
first_value, second_value): return first_value + second_value
7-
8-
5+
sum_two_values = lambda first_value, second_value: first_value + second_value
96
print(sum_two_values(2, 4))
107

11-
12-
def multiply_values(
13-
first_value, second_value): return first_value * second_value - 3
14-
15-
8+
multiply_values = lambda first_value, second_value: first_value * second_value - 3
169
print(multiply_values(2, 4))
1710

18-
1911
def sum_three_values(value):
2012
return lambda first_value, second_value: first_value + second_value + value
2113

22-
23-
print(sum_three_values(5)(2, 4))
14+
print(sum_three_values(5)(2, 4))

Intermediate/05_error_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
print(pi)
4343

4444
# ValueError
45-
#my_int = int("10 Años")
46-
my_int = int("10") # Descomentar para Error
45+
# my_int = int("10 Años") # Descomentar para Error
46+
my_int = int("10")
4747
print(type(my_int))
4848

4949
# ZeroDivisionError

Intermediate/06_file_handling.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,8 @@
3232

3333
# os.remove("Intermediate/my_file.txt")
3434

35-
# Clase en vídeo (03/11/22): https://www.twitch.tv/videos/1642512950
36-
3735
# .json file
3836

39-
4037
json_file = open("Intermediate/my_file.json", "w+")
4138

4239
json_test = {

Intermediate/07_regular_expressions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@
4545
print(re.sub("[l|L]ección", "LECCIÓN", my_string))
4646
print(re.sub("Expresiones Regulares", "RegEx", my_string))
4747

48-
# Clase en vídeo (09/11/22): https://www.twitch.tv/videos/1648023317
49-
5048
### Regular Expressions Patterns ###
5149

5250
# Para aprender y validar expresiones regulares: https://regex101.com

0 commit comments

Comments
 (0)