题海让大学四年没有难题
白天模式登陆

题目详情

单选题 下列if语句统计满足"性别(gender)为男、职称(title)为教授、年龄(age)小于40岁"条件的人数(n),正确的语句为( )

A. if (gender == "男" or age < 40 or title == "教授") : n += 1

B. if (gender == "男" or age < 40 and title == "教授") : n += 1

C. if (gender == "男" and age < 40 or title == "教授") : n += 1

D. if (gender == "男" and age < 40 and title == "教授") : n += 1

默认课程课程封面

学科:默认课程

时间:2026-04-15 12:05:29

Copyright © 2022 津ICP备2021001502号