考试Python变量与定量的选择题,一直做不对!
题目如下
POUND = "£"
DOLLAR = "$"
CONVERSION_DOLLAR_TO_POUND = 0.82
dollars_to_convert_str = input("How many whole dollars do you want to convert? ")
dollars_to_convert_int = int(dollars_to_convert_str)
equivalent_pounds = dollars_to_convert_int * CONVERSION_DOLLAR_TO_POUND
output_text = DOLLAR + dollars_to_convert_str + ' = ' + POUND + str(equivalent_pounds)
print (output_text)
请回答,
1.以上代码中,哪一个是变量(可多选)()?
A.DOLLAR
B.POUND
C.CONVERSION_DOLLAR_TO_POUND
D.input
E.dollars_to_convert_str
F.dollars_to_convert_int
G.equivalent_pounds
H.output_text
I.print
2.以上代码中,哪一个是常量(可多选)()?
A.DOLLAR
B.POUND
C.CONVERSION_DOLLAR_TO_POUND
D.input
E.dollars_to_convert_str
F.dollars_to_convert_int
G.equivalent_pounds
H.output_text
I.print