下面if语句统计满足“性别(gender)为男、职称(rank)为副教授、年龄(age)小于40岁”条件的人数,正确的语句为:
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 or rank='副教授'):n+=1
以下for语句结构中,( )不能完成1-10的累加功能
A. for i in range(10,0):total+=i
B. for i in range(1,11):total+=i
C. for i in range(10,0,-1):total+=i
D. for i in (10,9,8,7,6,5,4,3,2,1):total+=i