current position:Home>Python, excuse me, what's the matter with Python

Python, excuse me, what's the matter with Python

2022-02-02 20:07:54 CSDN Q & A

# Pictured , I want to type out the code of Figure 2 , But every time you knock x=int(input(2)) in the future , When you get back, one will come out 2, Want to go back and knock y=int(input(3)), An error will be reported in Figure 1 . How can I type it like a title .

img

img




Refer to the answer 1:

Don't write your content in input Inside. , That's the number the program reads from the keyboard
You write x=int(input()) All right.




Refer to the answer 2:



Refer to the answer 3:

Lay a good foundation before learning other codes .
x=int(input()) It's your program , Input at the terminal after operation , It's not about entering something into the program




Refer to the answer 4:



Refer to the answer 5:

You are now python The one I brought with me idle Run the code in , You could write it like this :

img

Or click the one in the upper left corner file , then new file, Enter the code , Save to a location , Then press F5 function ,

img




Refer to the answer 6:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202022007515365.html

Random recommended