输出应该以这种格式显示时间:上午8:00如何在输出中显示冒号以显示时间?
def save_time():
cse_info = {}
again = 'Y'
while again.lower() == 'y':
cse_num = int(input('Enter course number:'))
cse_time = int(input('Enter course meeting time:'))
cse_info['CS' + str(cse_num)] = str(cse_time) + ' a.m.'
again = input('Do you want to enter another course?')
print(cse_info)
save_time()
你期待什么输入'cse_time'?像“0833”? – kabanus
试图创建一个需要一个数字并显示此格式的输入:8:00 –
首先修复缩进,缩进问题无法回答 – abccd