中国大学MOOC: 请分析下面的程序,若输入score为80,输出grade为【 】if score >= 60.0: grade=Delif score>=70.0: grade=Celif score>=80.0: grade=Belif score>=90.0: grade=Aprint(grade)
举一反三
- 下面代码的输出结果是()。 <?php $score=87; if($score>=90 && $score<=100){$grade="优秀";} if($score>=80){$grade="良好";} if($score>=70){$grade="一般";} if($score>=60){$grade="及格";} else{$grade="不及格";} echo $grade; ?>
- if score >= 60.0: grade = 'D'elifscore >= 70.0: grade = 'C'elifscore >= 80.0: grade = 'B'else : grade = 'A'分析以上程序,输出等级为‘A’的输入是: A: 95 B: 100 C: 30 D: 90
- 分析下面程序,如果输入score为80,输出的grade是_____。[br][/br]if score>90:[br][/br]grade = 'A'[br][/br]elif score > 80:[br][/br]grade= 'B'[br][/br]elif score >70:[br][/br]grade = 'C'[br][/br]else:[br][/br]grade ='D' A: A B: B C: C D: D
- 命令Select S_No,Avg(Grade)As ‘平均成绩’ From Score Group By S_No Having Avg(Grade)>=85,表示
- 给出一百分制成绩,要求输出成绩等级A,P,N。其中:90分以上为A,60-89为D,60分以下为E。定义变量score代表成绩,grade变量代表等级。下面正确的语句是() A: if(score>=90) grade='A'; if(score>=60) grade='P'; if(score<60) grade='E'; B: if(score>=90) grade='A'; if(score<90 && score>=60) grade='P'; if(score<60) grade='E'; C: if(score>=90) grade=A; else if(score>=60) grade=P; else grade=E; D: if(score>=90) grade='A'; else (score<90 && score>=60) grade='P'; else (score<60) grade='E';