题目:利用条件运算符的嵌套来完成此题:学习成绩>=90分的同学用
2018-05-16 本文已影响0人
和卓
def main():
s = int(raw_input('Enter a number:'))
if s>=90:
grade = 'A'
elif s>=60:
grade = 'B'
else:
grade = 'C'
print grade,
if __name__ == '__main__':
main()
def main():
s = int(raw_input('Enter a number:'))
if s>=90:
grade = 'A'
elif s>=60:
grade = 'B'
else:
grade = 'C'
print grade,
if __name__ == '__main__':
main()