Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
702 views
in Technique[技术] by (71.8m points)

python - how to get ln[]: in jupyter notebook?

here how it looks like

I am new to the notebook and my code doesn't output. It just pretends all the code like as text. I suspect it is because I am not creating appropriate cell. every example on the internet has ln function near the cell and I just don't have that. how do I solve my problem? thx.

question from:https://stackoverflow.com/questions/66056771/how-to-get-ln-in-jupyter-notebook

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

[] means the code in the cell is running and as you had asked for input from the user, the cell is waiting for receiving the input from the user. It will keep on showing the [] until you provide input and press the entre button. After pressing the entre button, the input will be stored in the name variable. And finally, that input will be printed as Hello NAME!. After the code runs successfully, the [*] will be changed to [1].
In your case, the cell is waiting to receive the input from the user. So, as soon as you provide the input, the cell will be executed successfully.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...