×ðÁú¿­Ê±

ÔÚ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
¡¾ÍøÕ¾µØͼ¡¿¡¾sitemap¡¿