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
举一反三
- 下面if语句统计满足“性别( gender)为男、职称(rank)为副教授、年龄(age) 小于 40 岁”条件的人数,正确的语句为
- 下面If语句统计满足职称(用字符串变量duty表示)为副教授或教授、且年龄(用整型变量age表示)小于40岁条件的人数,正确的语句是______。 A: If age < 40 And (duty = "教授" or duty = "副教授") Then n = n + 1 B: If age < 40 And duty = "教授" or duty = "副教授" Then n = n + 1 C: If age < 40 And duty = "教授" or "副教授" Then n = n + 1 D: If age < 40 Or duty = "教授" And duty = "副教授" Then n = n + 1
- 下面if语句统计“成绩(mark)优秀(90分以上)的男生以及不及格(60以下)的男生”的人数,正确的语句为( )。 A: if(gender=="男")and((mark<60)and(mark>=90)):n+=1 B: if(gender=="男")and((mark<60)or(mark>=90)):n+=1 C: if(gender=="男")or(mark<60)or(mark>=90)):n+=1 D: if(gender=="男")or(mark<60)and(mark>=90):n+=1
- 下面用if语句统计“成绩(score)优秀的男生以及不及格的男生”的人数,正确的语句为_____。 A: if(gender=="男" and score <60 or score>=90): n+ = 1 B: if(gender=="男" and score <60 and score>=90): n+ = 1 C: if(gender=="男" and (score <60 or score>=90)): n+ = 1 D: if(gender=="男" or score <60 or score>=90): n+ = 1
- 如果要插入一条员工数据,则下列选项正确的是() A: INSERT INTO Employee(Name,Gender,Age,Rank) values('张朝阳','男',48,'201') B: INSERT INTO Employee(Name,Gender,Age,Rank) values(“张朝阳”,”男”,48,”201”) C: INSERT INTO Employee(Name,Gender,Age) values(‘张朝阳','男',48,'201') D: INSERT INTO Employee(Name,Gender,Age,Rank) value(‘张朝阳','男',48,'201')
内容
- 0
下面If语句统计满足职称(用字符串变量duty表示)为副教授或教授、且年龄(用整型变量age表示)小于40岁条件的人数,正确的语句是______。 A: If age < 40 And (duty = "教授" or duty = "副教授") Then n = n + 1 B: If age < 40 And duty = "教授" or duty = "副教授" Then n = n + 1 C: If age < 40 And duty = "教授" or "副教授" Then n = n + 1 D: If age < 40 Or duty = "教授" And duty = "副教授" Then n = n + 1
- 1
中国大学MOOC:下面If语句统计满足性别(sex)为男、职称(duty)为副教授以上、年龄(age)小于40岁条件的人数,不正确的语句是()。
- 2
Ingeneral,inasocialsetting,()isthe"trumpcard"anddeterminesthehigherrank;womenarealwaysrankedovermen. A: rank B: age C: gender D: authority
- 3
下列( )方法定义和调用的代码是正确的。 A: static void Introduce(string gender = "男", string name, int age = 18){} Introduce(name: "alex", age: 20); B: static void Introduce(string name, int age = 18, string gender = "男"){} Introduce(age: 20, name: "alex"); C: static void Introduce(string gender = "男", string name, int ago = 18){} Introduce(age: 20, name: "alex"); D: static void Introduce(string name, int age = 18, string gender = "男"){}Introduce(name: "alex", age: 20);
- 4
【单选题】生成如下数据框的语句是? weight height gender age 1 80 180 male teen 2 75 170 male teen 3 60 165 female adult 4 52 150 female adult A. X ,gender=c("male", "male", "female", "female"),age=c("teen","teen","adult","adult")) B. X ,gender=c("male", "male", "female", "female"),age=c("teen","teen","adult","adult")) C. X ,gender=c(male, male, female, female),age=c(teen,teen,adult,adult)) D. X ,gender=c("male", "male", "female", "female"),age=c("teen","teen","adult","adult"))