Python3 练习笔记一
在学习的过程中留下一点笔记,便于今后随时查看
输入一个字母判断并输出是星期几
# python练习:输入一个字母判断是星期几 nu = 1 while nu > 0: letter = input("\nPlease Input:") if letter == 'S': print("Please Second input:") letter = input("\tPlease Input:") if letter == 'a': print("\t\tSaturday") elif letter == 'u': print("\t\tSunday") else: print("\t\tData Error") elif letter == 'T': print("Please Second input:") letter = input("\tPlease Input:") if letter == 'u': print("\t\tTuesday") elif letter == 'h': print("\t\tThursday") else: print("\t\tData Error") elif letter == 'M': print("\tMonday") elif letter == 'W': print("\tWednesday") elif letter == 'F': print("\tFriday") else: print("\tData Error")
Pycharm调试输出如下: