返回课程
AI001 专业级

Python 编程入门

学习 Python,一种流行的编程语言,涵盖从网页和软件开发到数据科学和质量保证的核心概念。所掌握的技能包括编写 Python 3 程序以及简化代码。

4.9
30.0h
1254 名学生
10 lessons
0 点赞
人工智能
开始学习

课程概述

📚 课程概览

学习一门流行的编程语言 Python,涵盖从网页和软件开发到数据科学和质量保证的所有核心概念。你将掌握编写 Python 3 程序的技能,并简化代码。

核心目标简述:掌握 Python 基础知识、控制流程、数据结构(列表、字符串、字典)、函数、模块以及文件处理,最终入门面向对象编程。

🎯 学习目标

  1. 编写并运行基础的 Python 3 脚本,应用基本语法和内置数据类型(int、float、str)。
  2. 使用控制流结构(if/else、for/while 循环)实现复杂的程序逻辑,以管理执行路径。
  3. 设计并使用函数和模块来组织程序,提高代码的可重用性和可维护性。
  4. 有效利用 Python 的核心数据结构(如列表、字符串、字典)来管理数据。
  5. 通过文件输入/输出操作(文本、CSV 和 JSON)与外部数据源进行交互。

课程

Lesson

This lesson introduces the fundamentals of Python programming, focusing on the print function, variable assignment, and core data types like strings and floats. Students will learn essential syntax rules, including the importance of indentation, code documentation with comments, and the proper use of quotes for textual data.

This lesson introduces control flow as the mechanism for directing program logic beyond simple sequential execution using selection structures like if/else statements. Students will learn to build dynamic programs by utilizing Boolean expressions, relational operators, and logical operators to evaluate conditions and determine execution paths.

This lesson introduces Python lists as versatile, ordered, and mutable sequences defined by square brackets that can store heterogeneous data types. Students will learn how to manipulate lists through indexing, slicing, and methods like append and remove, as well as how to manage complex data using nested list structures.

This lesson introduces iteration as a fundamental programming concept that uses loops to automate repetitive tasks and uphold the "Don't Repeat Yourself" (DRY) principle. Students learn to distinguish between definite iteration using `for` loops for known sequences and indefinite iteration using `while` loops for conditional tasks.

This lesson introduces functions as a fundamental tool for achieving modularity and adhering to the DRY (Don't Repeat Yourself) principle in Python. You will learn how to define and call functions using parameters to eliminate repetitive logic, improve code maintainability, and reduce the risk of errors.

This lesson introduces Python strings as immutable, ordered sequences of Unicode characters that can be defined using single or double quotes. Students will learn how to manipulate these objects using built-in methods and how to access specific characters through both positive and negative indexing.

This lesson introduces Python modules as reusable files that help organize code, prevent naming collisions, and improve maintainability. Students will learn how to use various import methods to access built-in libraries and structure their own projects into logical, manageable components.

This lesson introduces Python dictionaries as mutable, unordered collections that store data in unique key-value pairs for efficient retrieval. Students learn how to initialize dictionaries using curly braces, access values via keys rather than numerical indices, and manage data by adding, updating, or overriding entries.

This lesson introduces file input and output (I/O) as a method for achieving data persistence, allowing information to be stored beyond a program's execution. Students will learn how to use the open() function and various access modes to read, write, and append data to external files while ensuring proper resource management.

This lesson introduces Object-Oriented Programming (OOP) as a design approach that organizes code into self-contained objects by bundling data attributes with their associated methods. Students learn to distinguish between procedural programming and OOP, focusing on how custom classes act as blueprints to create cohesive, reusable, and real-world models of complex entities.