题目
题目

Fal25_CS003C_74229 Ch. 3 Pre-Quiz (Remotely Proctored)

单项选择题

Which of the following statements can be used to validate whether the value a user entered for a grade is in the range 0 to 100, including both 0 and 100?

选项
A.if grade > 0 and grade < 100 :
B.if grade >= 0 and grade <= 100 :
C.if grade <= 0 and grade >= 100 :
D.if grade <=0 or grade >=100 :
查看解析

查看解析

标准答案
Please login to view
思路分析
To validate a grade within the inclusive range 0 to 100, we must consider how each conditional expresses the allowed values. Option 1: 'if grade > 0 and grade < 100 :' This condition uses strict inequality, so it excludes 0 and 1......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

类似问题

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!