m0_74087496 2022-10-05 00:04 采纳率: 50%
浏览 81
已结题

为什么一直会报错啊 forgot a comma

img

为什么python会报错啊,按照标准答案进行编程的,检查过好多遍都没有问题

  • 写回答

1条回答 默认 最新

  • 梦里逆天 2022-10-05 09:01
    关注

    img


    少了右括号

    myName = input("Please input your name(last,first):").strip()
    myBirthday = input("Please input your birthday(mm/dd/yyyy):").strip()
    myUserName = input("Please input your user name with 3 characters:").strip()
    myCourse = input("Please input your course:").strip()
    myBook = input("Please input your book(title,publisher,year):").strip()
    
    birthMonth = int(myBirthday.split("/")[0])
    birthDay = int(myBirthday.split("/")[1])
    birthYear = int(myBirthday.split("/")[2])
    print(birthYear, birthMonth, birthDay)
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 10月13日
  • 已采纳回答 10月5日
  • 创建了问题 10月5日