Duplicated #42
- The body of if is executed only if this evaluates to create the route or if the status is equal to 201
if = status == 201 (HTTP 201 is CREATED) = correct
- So, if the route is I52not be created, the body of else is executed
else: = correct
Note: if-else statement evaluates the Boolean expression. If the condition is TRUE then, the code present in the “ if “ block will be executed otherwise the code of the “else“ block will be executed
Wrong
if response == 601 = there is no 6xx HTTP code
elif is used to include multiple conditional (and it is not this case)
when is used to run a block of code whenever, during the execution of the program, a condition is met or related to an event (and it is not this case)
Answer is correct. only like this it will not work. you will need indents behind the if else
upvoted 1 times
...
This section is not available anymore. Please use the main Exam Page.350-901 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
anon1
Highly Voted 1 year, 9 months agoTeringzooi
Most Recent 8 months, 4 weeks agodesignated
10 months, 1 week ago[Removed]
1 year, 6 months agolente_kriebels
1 year, 10 months ago