这是我看大佬的代码:
我运行的话,“%%render”老是报错,这是为什么啊?
from math import sqrt,asin,sin import handcalcs.render %%render a=1 b=4 c=3 x=(-b+sqrt(b**2-4*a*c))/(2*a)
%%render 类似调用一个渲染的单元
handcalcs 旨在与 Jupyter Notebook 或 Jupyter Lab 一起用作单元魔法。
只能在jupyter中调用哦GitHub - connorferster/handcalcs: Python library for converting Python calculations into rendered latex. Python library for converting Python calculations into rendered latex. - GitHub - connorferster/handcalcs: Python library for converting Python calculations into rendered latex. https://github.com/connorferster/handcalcs
jupyter安装使用可参考:Python的必学技术——Jupyter Notebook_程序媛一枚~的博客-CSDN博客 推荐 Jupyter NoteBook 的原因:整合所有的资源、交互性编程体验和零成本重现结果。Jupyter NoteBook 能够把软件代码、计算输出、解释文档、多媒体资源整合在一起的多功能科学运算平台。很符合英文里说一图胜千言(A picture is worth a thousand words)。可参考:安装:https://jupyter.org/install.html运行:https://jupyter.readthedocs.io/en/latest/running.html#r https://blog.csdn.net/qq_40985985/article/details/106758823