A Gentle Introduction to Python Programming

所在平台: Udemy

课程主页: https://www.udemy.com/course/a-gentle-introduction-to-python-programming/

课程评论:没有评论

第一个写评论        关注课程

课程简介

课程名称:Python编程入门 课程概述: Python是一种可用于多种用途的编程语言,从简单的用户脚本到网络服务器和复杂的API。其简单且高度可读的语法,使其成为初学者学习编写程序的理想语言。 学习内容: 本课程将首先安装Python 3解释器,并学习如何在命令行中运行解释器及执行Python源文件。接下来,我们将了解如何处理基本数据类型,包括进行简单的算术运算,使用字符串数据类型处理单词和字符,以及布尔类型(True和False的表示)。 后续将介绍更复杂的数据类型,包括如何创建和修改列表,以及字典类型的使用,这可以用于创建映射(如将账户号码映射到客户姓名)。 之后我们将学习控制流,涉及程序语句执行的顺序,包括if语句和循环(在满足某些条件时重复执行代码块)。此外,还将介绍函数,这使我们能够将代码组织成简单可重用的部分。我们还会讨论错误处理,以确保脚本不会因错误而中断执行。 课程最后,我们将通过三个实际编码练习进行总结。这些练习将要求用户输入数据,验证输入,并在命令行中显示结果。在无效输入的情况下,系统将提供有意义的错误信息。第一个练习是计算长方体的体积;第二个练习是计算一系列数字在1000以内的所有倍数之和;最后一个练习将显示给定维度的乘法表。 先决条件: 1. 使用命令行:需要了解如何在命令行中更改目录。Windows使用命令提示符,MacOS使用终端。 2. Python 3:本课程使用Python 3,和Python 2有显著差异。课程第一段视频将介绍如何安装和运行Python 3。 3. 推荐使用Notepad++:这是一个免费的开源文本编辑器,因其语法高亮和自动完成等功能而受到推荐。 通过本课程,学员将获得Python编程的基本技能,能够独立编写简单的程序。

课程评论(0条)

课程详情

OverviewPython is a programming language that can be used for a wide variety of purposes, from simple user scripts to web servers and complex APIs. It has a simple, highly readable syntax which makes it a suitable language for people who want to learn how to write programs.What you will learn We will begin the course by installing the Python 3 interpreter. We will look at how to run the interpreter in the command line, as well as how to execute our Python source files.After that, we will learn about how to manipulate some basic data types. We will learn about how use Python to do simple arithmetic. Then, we will learn about working with words and characters, using a data type known as the "string". We will also cover the Boolean type, which is a representation of True and False inside of a programming language. Then we will move on to more complex types. First we will look at how we can organize data into a list. We will look at how to create lists, how to access elements inside them, and how to modify the contents of a list. Then, we will look at the dictionary type, which allows us to create mappings. For example, a dictionary could map account numbers to client names.We will then move on to control flow. Control flow refers to the sequence in which a program'sstatements are executed. We will look at the if statement, which allows the script to decide whether or not to execute a block of code based on some condition. We will also look at looping. Looping refers to repeatedly executing a block of code until some condition is met. Functions will also be covered, which will allow us to organize code into simple, reusable pieces. Then, we will learn about errors, and how to handle them properly so that they do not halt execution of the script.Finally, we will end the course with three practical coding exercises. These exercises will ask for user input, validate the user input, and display a result in the command line. In cases of invalid input,meaningful error messages will always be displayed to the user. The first exercise will involve asking the user for the length, width and height for a rectangular box. The program will then calculate and display the box's volume. The second exercise will calculate the sum of all multiples of a list of numbers up to 1000. The last exercise will ask the user for a length and a width, and display a multiplication table with the given dimensions.Prerequisites Using the command line: In order to execute our coding examples, we will need to use the command line. In Windows, this is the Command Prompt and in MacOS this is the Terminal. For the purposes of this course, students only need to know how to change directories inside the command line. Everything else can be learned by watching the videos.Python 3: This courses uses Python 3, which has some significant differences from Python 2. The first video of the course will demonstrate how to install Python 3, and how to run it in the command line.Notepad++ ( Recommended ): Notepad++ is a free, open-source text editor. Although JavaScript and HTML can be written using any text editor, Notepad++ is highly recommended because of features such as syntax highlighting and auto-complete.

课程标签

0人关注该课程

主题相关的课程