官术网_书友最值得收藏!

3 Python Fundamentals – Learn How to Code in Python

This chapter is for people who have little or no experience with the Python programming language. If you already know how to use for/while loops, methods, and classes in Python, you can skip this chapter and you shouldn't have any problems later on.

If, however, you have not used Python before, or have only barely used it, I strongly recommend that you follow this guide. You'll learn how to code the elements of Python I mentioned in the previous paragraph, you'll fully understand the codes included in this book and you'll be able to code in Python on your own. I'll also give you some additional exercises, called "homework" throughout the chapter, which I strongly recommend that you do.

Before you begin, open your Python editor. I recommend using the Google Colab notebook, introduced to you as part of your AI Toolkit in the previous chapter. All the code, along with homework solutions, are provided on the GitHub page of this book in Chapter 3 in their corresponding section folders. Inside them, you will find two Python files: one (named the same as the section) is the code used in this book, while the homework.py file is the solution to the exercise. Instructions for each homework exercise will be provided at the end of each section.

In this chapter, we'll cover the following topics:

  • Displaying text
  • Variables and operations
  • Lists and arrays
  • if statements and conditions
  • for and while loops
  • Functions
  • Classes and objects

Especially if you're starting from scratch, cover each section in the order they're presented here, and remember to try your hand at the homework. Let's get started!

主站蜘蛛池模板: 同心县| 阿勒泰市| 青海省| 连南| 绥芬河市| 鄯善县| 巴彦淖尔市| 深水埗区| 安泽县| 海阳市| 黄平县| 安仁县| 钟祥市| 东城区| 米林县| 铁岭市| 读书| 忻州市| 卓资县| 铜梁县| 临洮县| 新野县| 临夏市| 咸阳市| 固阳县| 丹凤县| 乌拉特中旗| 都昌县| 郁南县| 韶关市| 岱山县| 梨树县| 龙江县| 原平市| 乡城县| 井陉县| 西畴县| 喜德县| 莱阳市| 丹寨县| 蒙山县|