Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

/ D CS 1313 010 Fall 2017 (P XY D he08.pdf \"YC Chegg Study Guided s: x O New Ru

ID: 3597430 • Letter: #

Question

/ D CS 1313 010 Fall 2017 (P XY D he08.pdf "YC Chegg Study Guided s: x O New Rule: A Bone to fix e-ox CO cs1313.ou.edu /hw08.pdf Q tº :: Apps 0 ouCanvas OU Email Aspen Heights Norm D CS 1313 010 Fall 2016 CodeLab - Web Base an BB Group - Leading Corning I Materials SS Ecolab Home O Kimberly-Clark 2. When you write an if-block for idiotproofing, does the exit statement belong before the if-block, inside the if-block or after the if -block? Therefore, should the exit statement be indented less than the if statement, the same as the if statement, or more than the if statement? Type here to search Do e o o TO Microsoft Support 1-877-821-4559 a All go ENG ORMAN, R. 10

Explanation / Answer

When idiotproofing, the exit statement should be inside an if statement because if a user's input is invalid then we should exit because the invalid inputs can cause errors in the running of program.

In languages where indentation matters for example python, the exit statement should be indented more than if statement because we want to include the exit statement in the if block.

Please do give a thumbs up.