TypeError: unsupported operand type(s) for +: 'int' and 'str' error

后端 未结 3 1599
灰色年华
灰色年华 2020-12-04 03:10

Im having a problem with my code and it says

TypeError: unsupported operand type(s) for +: \'int\' and \'str\'

and i\'m not sur

3条回答
  •  猫巷女王i
    2020-12-04 04:15

    Cast the string by default input to an integer so that you can compute average scores:

    Score1 = int(input("what did the first person get in their test the first time?"))
    

提交回复
热议问题