Python_day2

Highlight

Visual Studio Code, the print() and input() function
Visual Studio Code downloading failed.
But I practiced some simple coding.

print('I am a hero')
I am a hero
print('I love dogs','I love cats')
I love dogs I love cats
print(8487-47566)
-39079
name=input()
JoJo
 name
'JoJo'
 print(name)
JoJo

Finally I installed the Visual Studio Code and made a .py file. WHAT A TOUGH WORK!

C:\Users\Zoie0>D:

D:\>cd:D:\XXX\python\coding
The filename, directory name, or volume label syntax is incorrect.

D:\>cd D:\XXX\python\coding

D:\ChenZY\python\coding>dir
 Volume in drive D is Data
 Volume Serial Number is B4E6-8C04

 Directory of D:\XXX\python\coding

2022/04/18  16:40    <DIR>          .
2022/04/18  16:40    <DIR>          ..
2022/04/18  16:40                20 hello.py
               1 File(s)             20 bytes
               2 Dir(s)  1,714,315,542,528 bytes free

D:\XXX\python\coding>python hello.py
hello world

I am very unfamiliar with the Visual Studio Code. I have to use it everyday.
NOTE: 1.The text after a # is simply ignored as a human-readable comment and is not considered part of the statement’s syntax.
2.Using 4 spaces for indentation.( But how to set the tab to automatically convert to 4 spaces in my Visual Studio Code?)

Some reviews:

  1. The Python interpreter is a program that runs the Python programs you write.
  2. Source code is the statements you write for your program—it consists of text in
    text files that normally end with a .py extension.
  3. Byte code is the lower-level form of your program after Python compiles it. Python automatically stores byte code in files with a .pyc extension.
  4. The PVM is the Python Virtual Machine—the runtime engine of Python that interprets your compiled byte code.
  5. Psyco, Shedskin, and frozen binaries are all variations on the execution model.
  6. CPython is the standard implementation of the language. Jython and IronPython implement Python programs for use in Java and .NET environments, respectively;they are alternative compilers for Python.

X: - Jump to a certain disk;

dir - all files in this directory;

cd XX - jump to the XX directory;

more XX——XX details;

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容