0
Follow
2
View

How does code with a close Angle bracket run in pycharm

cuisite123 注册会员
2023-02-28 10:18

1. Your code syntax is all wrong. The return value from input is not assigned to the variable
2. You don't have Angle brackets in your code at all
3. Take a little bit of python grammar and start working on programming problems. You now have an input and don't even know what a variable is, so don't get too esoteric.

demon909 注册会员
2023-02-28 10:18

This answer quotes ChatGPT

In Python, the right Angle bracket(">"; These close Angle brackets are typically used in interactive command line prompts to indicate the indentation level of a block of code, and are not required in actual writing Python code. When writing code, you simply enter the Python code you need.

For the input() function, you can use double or single quotes to refer to the prompt message and input data, such as:

name = input("请输入您的名字:")

or


data = input('请输入数据:')

In PyCharm, you can run Python code in two ways, the second of which is more commonly used:

Runs the code directly in PyCharm's Terminal:
opens the PyCharm terminal, usually in the "terminal" TAB on the bottom panel.
Go to the directory that contains the code files.
Run the code file, for example:

python my_code.py

where "my_code.py" is the file name of your code.

Runs the code in PyCharm's editor:
opens your code file.
Click the green Run button at the top left of the editor window or press the shortcut "Shift+F10"(Windows) or "Control+R"(Mac).
If you have not already created a run configuration, select "Create 'my_code'"(where "my_code" is the file name of your code) and press Enter, and PyCharm will create a configuration for you.
PyCharm runs the code and displays the output in the bottom panel.

About the Author

Question Info

Publish Time
2023-02-28 10:18
Update Time
2023-02-28 10:18

Related Question

Visual Code Studio无法连接到浏览器

关于visual stdio code的c语言配置环境

Xcode Picker View将跳转到另一个值,而不是被选中的值

VS Code:传递环境变量来构建任务

vscode 中的 settings.json 设置后不起作用

我怎么能修复VSCode崩溃时打开的半个窗口?

VSCode为自定义语言创建自定义彩色语言语法高亮显示扩展

iOS构建失败,无法生成“ld: bitcode包”

Codeigniter SQL查询复杂构造

java 调用微信授权之后获取到code,没进到接口