[Pati] labs of handling errors#23
Open
patriciazapatab wants to merge 1 commit intoIronhack-data-bcn-oct-2023:mainfrom
Open
[Pati] labs of handling errors#23patriciazapatab wants to merge 1 commit intoIronhack-data-bcn-oct-2023:mainfrom
patriciazapatab wants to merge 1 commit intoIronhack-data-bcn-oct-2023:mainfrom
Conversation
|
Hello Pati:) YESSSSSS! Buen lab e hiciste el bonus, increíble:) well dooooooone. Te dejo un par de cosillas sin importancia.
vowels = "aeiouAEIOU"
non_vowels = [i for i in teststring if i not in vowels and i != ' ']
print (non_vowels)Correctísima tu respuesta! Solo te dejo un pequeño tip para simplificar el código:) Si añades
Aquí si has añadido consonants_string = "".join(str(element) for element in consonants)
print (consonants_string)
try:
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
c = a/b
print(f'Division of {a}/{b} = {c}')
except ValueError:
print(f'Input should be an int')
except ZeroDivisionError:
print(f'(You are trying to divide by 0)')Tu respuesta es super válida pero puedes simplificarlo de esta manera para ahorrarte un try:)))))) A por el siguiente laaaaaab! 💥🙌🏼🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

saved him