• 2021-04-14
    下面If语句统计满足性别为男,职称为副教授以上,年龄小于40岁条件的人数,不正确的语句是_____ 。
  • C

    内容

    • 0

      中国大学MOOC: 下面If语句统计满足职称(用字符串变量duty表示)为副教授或教授、且年龄(用整型变量age表示)小于40岁条件的人数,正确的语句是______。

    • 1

      158.表示职称为副教授同时性别为男的表达式为( ) A: 职称='副教授' OR 性别='男' B: 职称='副教授' AND 性别='男' C: BETWEEN '副教授' AND '男' D: IN ('副教授','男')

    • 2

      【单选题】下面的if语句统计满足“性别(gender)为男、职称(rank)为教授、年龄(age)小于40岁”条件的人数,正确的语句为 (2.0分) A. if (gender=="男" or age<40 and rank="教授"): n+=1 B. if (gender=="男" and age<40 and rank="教授"): n+=1 C. if (gender=="男" and age<40 or rank="教授"): n+=1 D. if (gender=="男" or age<40 and or="教授"): n+=1

    • 3

      下面If语句统计满足职称(用字符串变量duty表示)为副教授或教授、且年龄(用整型变量age表示)小于40岁条件的人数,正确的语句是______。 A: If age &lt; 40 And (duty = &quot;教授&quot; or duty = &quot;副教授&quot;) Then n = n + 1 B: If age &lt; 40 And duty = &quot;教授&quot; or duty = &quot;副教授&quot; Then n = n + 1 C: If age &lt; 40 And duty = &quot;教授&quot; or &quot;副教授&quot; Then n = n + 1 D: If age &lt; 40 Or duty = &quot;教授&quot; And duty = &quot;副教授&quot; Then n = n + 1

    • 4

      表示职称为副教授同时性别为女的表达式为() A: 职称=“副教授” and 性别=“女” B: 职称=“副教授” or 性别=“女” C: between “副教授” and “女” D: in(“副教授”,“女”)