Skip to content

Edu :) - #20

Open
edwardrodgermartinez wants to merge 1 commit into
Ironhack-data-bcn-oct-2023:mainfrom
edwardrodgermartinez:main
Open

edwardrodgermartinez wants to merge 1 commit into
Ironhack-data-bcn-oct-2023:mainfrom
edwardrodgermartinez:main

Conversation

@edwardrodgermartinez

Copy link
Copy Markdown

me voy a cenar :)

@bripollc

bripollc commented Oct 11, 2023

Copy link
Copy Markdown

Hola Edu:)

Felicidades por tu segundo lab!!!!!! En general está impecable, tengo poco a comentar.

Challenge 1: todo correcto!
Lo único:

  1. Now try to append the following elements to tup.
tup_append = tup + ("r","o", "n", "h", "a", "c", "k")
print(tup_append)

De esta manera te funcionará:)

  1. Count the number of elements in tup1 and tup2. Then add the two counts together and check if the sum is the same as the number of elements in tup3.
sum1 = len(tup1)
sum2 = len(tup2)
sum12 = sum1 + sum2
print(sum12)

sum3 = len(tup3)
print(sum3)

En tu código, estás imprimiendo la longitud del tup1 (4) y el tup 2 (4) por separado. Te pide que los sumes, por lo que debes añadir un contador que sume la longitud de ambos tups para que te de 8. Entonces si será igual a la longitud de la tup3, que también es 8.

Challenge 2: idem, está perfecto!
Lo único:

  1. Using the pop method, remove the first element from set1.
set1_list = list(set1)
set1_list.pop(0)
set1_list_pop = set(set1_list)  # And we convert it back to a set
print(set1_list_pop)

The pop method removes an element randomly, thus we could convert it to list to pop the first element.

Challenge 3 nada a comentar, está perfecto.

sigue así!!!!!!! 🚀
ps: espero que te vayas a cenar hoy más pronto:)

@edwardrodgermartinez

edwardrodgermartinez commented Oct 12, 2023 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants