I spent half an hour writing a code yesterday, but I didn’t expect that onlyinputStatement. The following is a part of the code:
After running,ifThe following statements are completely invalid.
First, I checked all the statements below and found no problems, and python did not report errors.
After that, I went to the QQ group and asked. They said that int () should be added. The modified code is as follows:
I don’t know if there is a problem with my understanding. The operation will report an error.
I gave up, too.
I was working on another program and suddenly remembered that I could try putting quotation marks around numbers. I tried and finally succeeded
I found that some can not be added, such as
r==1Medium1You don’t have to use quotation marks
This work adoptsCC agreement, reprint must indicate the author and the link to this article