Ask your own question, for FREE!
Computer Science 10 Online
Gucchi:

programming help

Gucchi:

1 attachment
Gucchi:

am i right wiht D?

Gucchi:

@extrinix can u just check this last one

Extrinix:

`try/except` works by seeing if an entire group of code can be ran, and if not, gives an `exception` of which allows the programmer to either continue with the code or stop the code. So that's the incorrect answer.

Gucchi:

@extrinix wrote:
`try/except` works by seeing if an entire group of code can be ran, and if not, gives an `exception` of which allows the programmer to either continue with the code or stop the code. So that's the incorrect answer.
hmm so C then its the only one which makes sense

Extrinix:

Can you explain why it makes sense?

Gucchi:

basically i'm checking whether the denominator is zero before performing the division, which prevents the errors from happening

Gucchi:

is that right

Extrinix:

Ah I read your prompt wrong actually. Yeah, it'd be what you chose originally. A divide by zero error would occur, which is what you need to catch before it breaks your program, apologies.

Amorist:

do/while: this is a loop and does not handle exceptions. for/while: are loop structures, not exception handling mechanisms. They control repetitive execution of code, but they don’t handle errors. If division by zero occurs inside a loop, the program will still crash unless it's caught by a try/except block While if/else can be used to check conditions like whether a denominator is zero, it cannot catch runtime exceptions like a division by zero error that occurs after evaluating the condition So, only try/except properly catches and handles runtime errors like division by zero

Amorist:

@extrinix wrote:
`try/except` works by seeing if an entire group of code can be ran, and if not, gives an `exception` of which allows the programmer to either continue with the code or stop the code. So that's the incorrect answer.
I wonder how you got this 'tech crew' label XD

Extrinix:

amorist wrote:
extrinix wrote:
`try/except` works by seeing if an entire group of code can be ran, and if not, gives an exception of which allows the programmer to either continue with the code or stop the code. So that's the incorrect answer.
I wonder how you got this 'tech crew' label XD
By answering questions, obviously.

Gucchi:

thank you

Gucchi:

@extrinix wrote:
amorist wrote:
extrinix wrote:
`try/except` works by seeing if an entire group of code can be ran, and if not, gives an exception of which allows the programmer to either continue with the code or stop the code. So that's the incorrect answer.
I wonder how you got this 'tech crew' label XD
By answering questions, obviously.
i have a few more i really need help with. are you free for a bit

Amorist:

@gucchi wrote:
@extrinix wrote:
amorist wrote:
extrinix wrote:
`try/except` works by seeing if an entire group of code can be ran, and if not, gives an exception of which allows the programmer to either continue with the code or stop the code. So that's the incorrect answer.
I wonder how you got this 'tech crew' label XD
By answering questions, obviously.
i have a few more i really need help with. are you free for a bit
Sure

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Countless7Echos: Ah trying out the whole T.V girl drawing :p (I love drawing eyes)
46 minutes ago 8 Replies 5 Medals
kaelynw: starting to draw a hand
2 days ago 16 Replies 2 Medals
Twaylor: Rate it :D (Took 2 days)
2 days ago 7 Replies 0 Medals
XShawtyX: Art, Short Writing Assignment: Imagining Landscapes
4 hours ago 7 Replies 1 Medal
XShawtyX: Chemistry, Help ud83dude4fud83cudffe
3 days ago 13 Replies 1 Medal
kaelynw: tried a lil smt, the arm is off but i like the other stuff
3 days ago 27 Replies 3 Medals
kaelynw: art igg
3 days ago 14 Replies 1 Medal
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!