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

Exploring activity

Here's an activity, a little bit of a challenge for you:

Here's a nice little code block where you can start writing your own Python code, run it, and play around with it, so please do so. Your challenge is to write some code that creates a list of integers, loops through each element of that list, pretty easy so far, and only prints out even numbers.

Now this shouldn't be too hard. There are examples in this notebook of doing all that stuff; all you have to do is put it together and get it to run. So, the point is not to give you something that's hard. I just want you to actually get some confidence in writing your own Python code and actually running it and seeing it operate, so please do so. I definitely encourage you to be interactive here. So have at it, good luck, and welcome to Python.

So that's your Python crash course, obviously, just some very basic stuff there. As we go through more and more examples throughout the book, it'll make more and more sense since you have more examples to look at, but if you do feel a little bit intimidated at this point, maybe you're a little bit too new to programming or scripting, and it might be a good idea to go and take a Python revision before moving forward, but if you feel pretty good about what you've seen so far, let's move ahead and we'll keep on going.

主站蜘蛛池模板: 左云县| 嘉义县| 沂水县| 柳州市| 新巴尔虎右旗| 西青区| 钟祥市| 滦平县| 眉山市| 昌黎县| 祁东县| 景东| 凤城市| 拉孜县| 昌平区| 舟山市| 乐陵市| 弋阳县| 浠水县| 威海市| 永顺县| 广宁县| 丰原市| 时尚| 东乌珠穆沁旗| 临海市| 黎城县| 修武县| 云安县| 平南县| 西贡区| 馆陶县| 渝北区| 马山县| 赫章县| 沽源县| 十堰市| 随州市| 高青县| 肥东县| 徐闻县|