5-3
def LevelTest(score): if 90 <= score <= 100: return ‘A‘ elif 80 <= score < 90: return ‘B‘ elif 70 <= score < 80: return ‘C‘ elif 60 <= score < 70: return ‘D‘ elif score < 60: return ‘F‘ else: return ‘NO FOUND‘ score = raw_input(‘Please enter you score: ‘) score = int(score) print LevelTest(score)
5-4
def Runnian(year): if (year % 4 == 0) and (year % 100 != 0) or year % 400 == 0: return ‘Is runnian!‘ else: return ‘Is not runnin‘ year = int(raw_input(‘Please enter the year: ‘)) print Runnian(year)
时间: 2024-10-06 05:44:09