The first Python primer for Programming Little white notes

Source: Internet
Author: User

---restore content starts---

ebook Marquis

First Chapter: why python?

What can 1.1 python do?

1. Easy to get started

2. Powerful Features

3. A lot of things to do: Web site backend programmers, automated operations, data analysts, game developers, automated testing;

The development of the website; the process of handling large amounts of information by crawling and fetching the goods; smart hardware

Chapter Ii: Start now

2.1 Installing the Python environment (slightly)

2.2 Using the IDE tool (slightly)

Chapter Iii: Variables and strings

3.1 Start learning Programming (slightly)

3.2 Variables

1. Python is case sensitive, which means “a” that “A” it will be two different variables instead of the Same.

2. Assign a value to a variable in the Format:

3.3 Print () 1. Print () function: printing function

2. example:

file = open(‘/Users/yourname/Desktop/file.txt‘,‘w‘)

file.write(‘hello world!‘) 

//这段代码打开了桌面上的 file.txt 文件,并写入了 Hello World!w 代表着如果桌面上有 file.txt 这个文件就直接写入 hello world ,如果没有   file.txt 这个文件就创建一个这样的文件。

3. To view the file path, the Windows user opens a file on the desktop with the Explorer to view the Path. The MAC user opens the terminal terminal and then drags a file on the desktop to view the Path.

3.4 String

1. What is a string? The data type that encloses the character with a pair of single quotation marks/double quotation marks/three quotation marks.

2. Basic use of strings

---restore content ends---

The first Python primer for Programming Little white notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.