In the following code segment:
# process 10 students
for student in range(10):
# get one exam result
result = int(input('Enter result (1=pass, 2=fail): '))
if result == 1:
passes = passes + 1
else:
failures = failures + 1
a. The if statement is nested in the for statement.
b. The if statement follows the for statement in sequence.
c. The for statement is nested in the if statement.
d. None of the above.
a. The if statement is nested in the for statement.
Computer Science & Information Technology
You might also like to view...
By default, a theme template is set to open with:
A) Excel. B) Word. C) PowerPoint. D) Access.
Computer Science & Information Technology
________ is the dependent cell with this formula in A10:
=Sum(A2:A8) Fill in the blank(s) with correct word
Computer Science & Information Technology
________ variables are data that can be aggregated by summing, counting, or averaging
A) Aggregate B) Category C) Grouping D) Summary
Computer Science & Information Technology
Most abbreviations are acceptable when writing for a general audience.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology