Python基础---如何运行Python程序?(How to Excute a python programe?)

如何运行Python程序?(How to Excute a python programe?)

一些概念(Concept)

  • Python Interpreter

    • The Python interpreter can run Python programs that are saved in files or interactively execute Python statements that are typed at the keyboard. [1]
    • The Python interpreter is a program that can read Python programming statements and execute them. [1]
  • IDLE

    • Python comes with a program named IDLE that simplifies the process of writing, executing, and testing programs. [1]
  • IDE

    • Integrated DeveLopment Environment. [1]
    • IDE is a single program that gives you all of the tools you need to write, execute, and test a program. [1]
  • Python Shell

    • When the Python interpreter is running in interactive mode, it is commonly called the Python shell. [1]

运行Python程序操作(Excuting python statements or python programs)

  • Two modes: Interpreted mode and Script mode.
  • Interpreted mode:
    • 操作环境:win10家庭中文版,Python 3.7.3
    • Command Line:
    1. Open the OS’s Command Line;
    2. 【python】
    3. type your command:在这里插入图片描述
    • IDLE:
    1. Open IDLE
    2. type your command:在这里插入图片描述
  • Script mode
    • 操作环境:win10家庭中文版,Python 3.7.3
    • Command Line:
    1. create a python file, like HelloWorld.py
    2. go to the directory in which the file is saved
    3. type your command:
      在这里插入图片描述
    • IDLE:
      • 【file】-【open】- open the python file
      • run module 【F5】
        在这里插入图片描述
        在这里插入图片描述
        参考文献
        [1] Tony Gaddis,Starting Out with Python[M],United Kingdom: Pearson,2019
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值