下列代码是用Python创建的计算某公园门票价格的函数,门票价格的计算规则如下:1)未满5岁的顾客=免门票2)5岁或5岁以上的学生顾客=10元3)5岁到17岁的非学生顾客=20元4)17岁以上的非学生顾客=50元部分代码如下,请把空下的代码补全。def admission_fee(age,school):rate=0(1)rate=10( 2)(3 )rate=20else:rate=50return rate
A. 1: if age >=5 and age<=17:2: elif if age >=5 and school==True:3: if age >=5 and shool ==Flase
B. 1: if age >=5 and age<=17:2: elif if age >=5 and school==True:3: if age <=17:
C. 1: if age >=5 and age<=17:2: elif iage >=5 and school==Frue:3: if age >=5 and shool ==True:
D. 1: if age >=5 and school==True::2:elif age >=5 and school==False:3: if age <=17: