Task 8 of 10 · 0 solved · 10 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

1.6 Logic — safe division check

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

Print whether b divides a evenly — and the program must not crash when b is 0.

For a = 10, b = 0 the program prints false. Put the guard before the division: short-circuit evaluation does the rest.

Your solution