×ðÁú¿­Ê±¹ÙÍøµÇ¼

ÔÚLinuxÉÏʹÓÃVisual Studio Code¾ÙÐÐÈË»ú½»»¥¿ª·¢µÄÍƼöÉèÖÃ

ÔÚlinuxÉÏʹÓÃvisual studio code¾ÙÐÐÈË»ú½»»¥¿ª·¢µÄÍƼöÉèÖÃ

Ëæ×ÅÈ˹¤ÖÇÄܺͻúеѧϰµÄ¿ìËÙÉú³¤ £¬ÈË»ú½»»¥¿ª·¢±äµÃÔ½À´Ô½Ö÷Òª¡£¶ø×÷Ϊһ¿î¹¦Ð§Ç¿Ê¢µÄ¿ª·¢¹¤¾ß £¬Visual Studio Code(ÒÔϼò³ÆVS Code)ÔÚÈË»ú½»»¥¿ª·¢ÖÐÊ©Õ¹ÁËÒªº¦×÷Óᣱ¾ÎĽ«ÏÈÈÝÔÚLinuxÉÏʹÓÃVS Code¾ÙÐÐÈË»ú½»»¥¿ª·¢µÄÍƼöÉèÖà £¬²¢Ìṩ´úÂëʾÀý¡£

×°ÖÃVS Code

Ê×ÏÈ £¬ÎÒÃÇÐèҪװÖÃVS Code¡£»á¼ûVS CodeµÄ¹Ù·½ÍøÕ¾£¨https://code.visualstudio.com/£©²¢ÏÂÔØÊÊÓÃÓÚLinuxµÄ×°ÖóÌÐò¡£×°ÖÃÍê±Ïºó £¬·­¿ªVS Code¡£

×°ÖÃPython²å¼þ

ÔÚVS CodeÖÐ £¬PythonÊÇÒ»ÖַǾ­³£Óõıà³ÌÓïÑÔ £¬ÌØÊâÊʺÏÈË»ú½»»¥¿ª·¢¡£ÎªÁËʹVS CodeÖ§³ÖPython¿ª·¢ £¬ÎÒÃÇÐèҪװÖÃPython²å¼þ¡£ÔÚVS CodeµÄ²à±ßÀ¸ÖÐ £¬µã»÷¡°À©Õ¹¡±Í¼±ê £¬ËÑË÷²¢×°Öá°Python¡±²å¼þ¡£

ÉèÖÃPythonÇéÐÎ

ÔÚVS CodeÖÐ £¬ÎÒÃÇÐèҪȷ±£PythonÇéÐÎÉèÖÃ׼ȷ¡£µã»÷VS Code×óϽǵġ°PythonÇéÐΡ±µÄÑ¡Ïî £¬Ñ¡Ôñ׼ȷµÄPythonÚ¹ÊÍÆ÷¡£Äã¿ÉÒÔÑ¡ÔñÈ«¾ÖPythonÚ¹ÊÍÆ÷ £¬»òÕßÑ¡ÔñÒ»¸öÐéÄâÇéÐΡ£È·±£ÄãµÄPythonÇéÐοÉÒÔÕý³£ÔËÐС£

×°ÖÃJupyter²å¼þ

JupyterÊÇÒ»¸ö½»»¥Ê½ÅÌËãÇéÐÎ £¬ÆÕ±éÓ¦ÓÃÓÚÈË»ú½»»¥¿ª·¢ÖС£ÎªÁËÔÚVS CodeÖÐʹÓÃJupyter £¬ÎÒÃÇÐèҪװÖÃJupyter²å¼þ¡£ÔÚVS CodeµÄÀ©Õ¹À¸ÖÐËÑË÷²¢×°Öá°Jupyter¡±²å¼þ¡£

½¨ÉèJupyterÌõ¼Ç±¾

ÔÚVS CodeÖÐ £¬ÎÒÃÇ¿ÉÒÔ½¨ÉèJupyterÌõ¼ÇÔ­À´¾ÙÐÐÈË»ú½»»¥¿ª·¢¡£ÔÚVS CodeµÄ²à±ßÀ¸ÖÐ £¬µã»÷¡°Îļþ¡±->¡°Ð½¨Îļþ¡± £¬²¢½«ÎļþÉúÑÄΪ¡°.ipynb¡±ÃûÌá£ÕâÑù¾Í½¨ÉèÁËÒ»¸öеÄJupyterÌõ¼Ç±¾¡£

±àд´úÂëʾÀý

ÒÔÏÂÊÇÒ»¸ö¼òÆÓµÄÈË»ú½»»¥¿ª·¢´úÂëʾÀý £¬Õ¹Ê¾ÁËÔõÑùʹÓÃVS Code¾ÙÐл¥¶¯ÅÌË㣺

# µ¼ÈëËùÐè¿â
import numpy as np

# ½ç˵һ¸öº¯Êý£¬Æ¾Ö¤ÊäÈëµÄÊý×Ö¾ÙÐмӷ¨ÔËËã
def add_numbers(a, b):
    return a + b

# ÊäÈëÁ½¸öÊý×Ö
num_1 = float(input("ÇëÊäÈëµÚÒ»¸öÊý×Ö£º"))
num_2 = float(input("ÇëÊäÈëµÚ¶þ¸öÊý×Ö£º"))

# ŲÓú¯Êý²¢Êä³öЧ¹û
result = add_numbers(num_1, num_2)
print("Ч¹ûΪ£º", result)

µÇ¼ºó¸´ÖÆ

ÔÚÕâ¸öÀý×ÓÖÐ £¬ÎÒÃǵ¼ÈëÁËnumpy¿â £¬½ç˵ÁËÒ»¸ö¼Ó·¨º¯Êý £¬²¢Í¨¹ýinputº¯Êý»ñÈ¡Óû§ÊäÈëµÄÁ½¸öÊý×Ö¡£È»ºó £¬ÎÒÃÇŲÓú¯Êý²¢½«Ð§¹û´òÓ¡³öÀ´¡£

ÔËÐдúÂëʾÀý

ÒªÔÚJupyterÌõ¼Ç±¾ÖÐÔËÐдúÂëʾÀý £¬Ö»Ðèµã»÷ËùÐè´úÂë¿éÅԱߵġ°ÔËÐС±°´Å¥¡£´úÂ뽫ÔÚVS CodeµÄ¼¯³ÉÖÕ¶ËÖÐÖ´ÐÐ £¬²¢Êä³öЧ¹û¡£

ͨ¹ýÒÔÉÏ°ì·¨µÄÉèÖà £¬ÄãÒѾ­Íê³ÉÁËÔÚLinuxÉÏʹÓÃVS Code¾ÙÐÐÈË»ú½»»¥¿ª·¢µÄÍƼöÉèÖá£VS CodeÌṩÁ˸»ºñµÄ¹¦Ð§ºÍ²å¼þ £¬¿ÉÒÔ´ó´óÌá¸ßÈË»ú½»»¥¿ª·¢µÄЧÂÊ¡£Ï£Íû±¾ÎĶÔÄãÓÐËù×ÊÖú£¡

ÒÔÉϾÍÊÇÔÚLinuxÉÏʹÓÃVisual Studio Code¾ÙÐÐÈË»ú½»»¥¿ª·¢µÄÍƼöÉèÖõÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ