jupyter notebook的Markdown:在Markdown单元格中添加数学操作的结果

huangapple go评论64阅读模式
英文:

jupyter notebook markdown: add results of math operation in markdown cell

问题

如何在Markdown单元格中添加数学运算的打印结果?我尝试了这个但不起作用:

print(32750-25797) patients dropped in step 2

我得到了以下输出:

print(32750-25797) patients dropped in step 2

但我想要这个输出:

6953 patients dropped in step 2
英文:

How can I add the printed results of math operation in the markdown cell? I tried this but didn't work:

`print(32750-25797)` patients dropped in step 2

I get

print(32750-25797) patients dropped in step 2

But I want this output:

6953 patients dropped in step 2

答案1

得分: 2

你必须使用Jupyter Notebook ExtensionsPython Markdown扩展。

英文:

You have to use the Python Markdown extension of the Jupyter Notebook Extensions.

答案2

得分: 0

Markdowns 用于编写数学方程式。它们不解决数学方程式,只将其显示为注释。

英文:

Markdowns are used to write mathematical equations. they don't solve mathematical equations. They only display it as a comment.

huangapple
  • 本文由 发表于 2020年1月4日 00:47:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/59582272.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定