Challenge: Safely Auth
Note
These comments help you find the code that needs to be modified:
========== Modify code below ==========
========== Modify code above ==========
Swipe to start coding
You have implemented the login()
function, which raises errors. Implement the safely_auth()
function that uses the login()
function and catches errors.
- Create a code block to track errors (mention the keyword).
- Call the
login()
function in the error tracking block. - Catch the
TypeError
and save its info inside theerror
variable. - Print the
error
variable (error info) in the console. - Catch the
ValueError
and save its info inside theerror
variable.
Løsning
Takk for tilbakemeldingene dine!
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Awesome!
Completion rate improved to 4.35Awesome!
Completion rate improved to 4.35
Challenge: Safely Auth
Note
These comments help you find the code that needs to be modified:
========== Modify code below ==========
========== Modify code above ==========
Swipe to start coding
You have implemented the login()
function, which raises errors. Implement the safely_auth()
function that uses the login()
function and catches errors.
- Create a code block to track errors (mention the keyword).
- Call the
login()
function in the error tracking block. - Catch the
TypeError
and save its info inside theerror
variable. - Print the
error
variable (error info) in the console. - Catch the
ValueError
and save its info inside theerror
variable.
Løsning
Takk for tilbakemeldingene dine!
single
Awesome!
Completion rate improved to 4.35
Challenge: Safely Auth
Sveip for å vise menyen
Note
These comments help you find the code that needs to be modified:
========== Modify code below ==========
========== Modify code above ==========
Swipe to start coding
You have implemented the login()
function, which raises errors. Implement the safely_auth()
function that uses the login()
function and catches errors.
- Create a code block to track errors (mention the keyword).
- Call the
login()
function in the error tracking block. - Catch the
TypeError
and save its info inside theerror
variable. - Print the
error
variable (error info) in the console. - Catch the
ValueError
and save its info inside theerror
variable.
Løsning
Takk for tilbakemeldingene dine!