Flashield's Blog

Just For My Daily Diary

Flashield's Blog

Just For My Daily Diary

Kaggle

05.exercise-loops-and-list-comprehensions【练习:循环及列表推导式】

This notebook is an exercise in the Python course. You can reference the tutorial at this link. Try It Yourself With all you’ve learned, you can start writing much more interesting programs. See if you can solve the problems below. As always, run the setup code below before working on the questions. 自己尝试一下 有了所学的知识,您就可以开始编写更有趣的程序了。 看看你能否解决下面的问题。 […]

05.course-loops-and-list-comprehensions【循环及列表推导式】

Loops Loops are a way to repeatedly execute some code. Here’s an example: 循环 循环是重复执行某些代码的一种方式。 这是一个例子: planets = ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'] for planet in planets: print(planet, end=' ') # print all on same line Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune The for loop specifies the variable name to […]

04.exercise-lists【练习:列表】

This notebook is an exercise in the Python course. You can reference the tutorial at this link. Try It Yourself Things get more interesting with lists. See if you can solve the questions below. Remember to run the following cell first. 自己尝试一下 有了列表,事情就变得更有趣了。 看看你能否解决下面的问题。 请记住首先运行以下单元格。 from learntools.core import binder; binder.bind(globals()) from learntools.python.ex4 import * print('Setup […]

04.course-lists【列表】

Lists Lists in Python represent ordered sequences of values. Here is an example of how to create them: 列表 Python 中的列表表示有序的值序列。 以下是如何创建它们的示例: primes = [2, 3, 5, 7] We can put other types of things in lists: 我们可以将其他类型的事物放入列表中: planets = ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'] We can even make a list of […]

exercise-booleans-and-conditionals【练习:布尔值及条件语句】

This notebook is an exercise in the Python course. You can reference the tutorial at this link. Try It Yourself Think you are ready to use Booleans and Conditionals? Try it yourself and find out. To get started, run the setup code below before writing your own code (and if you leave this notebook and […]

booleans-and-conditionals【布尔值及条件语句】

Booleans Python has a type of variable called bool. It has two possible values: True and False. 布尔值 Python 有一种称为bool的变量类型。 它有两个可能的值:True和False。 x = True print(x) print(type(x)) True Rather than putting True or False directly in our code, we usually get boolean values from boolean operators. These are operators that answer yes/no questions. We’ll go through […]

exercise-functions-and-getting-help【练习:函数】

This notebook is an exercise in the Python course. You can reference the tutorial at this link. Try It Yourself Functions are powerful. Try writing some yourself. As before, don’t forget to run the setup code below before jumping into question 1. 自己尝试一下 函数功能强大。 尝试自己写一些。 和以前一样,在进入问题 1 之前,不要忘记运行下面的设置代码。 # SETUP. You don't need to worry […]

functions-and-getting-help【函数和获取帮助】

You’ve already seen and used functions such as print and abs. But Python has many more functions, and defining your own functions is a big part of python programming. In this lesson, you will learn more about using and defining functions. 您已经看到并使用了诸如print和abs之类的函数。但是Python具有更多功能,定义自己的函数是Python编程的重要组成部分。 在本课程中,您将了解有关使用和定义函数的更多信息。 Getting Help You saw the abs function in the previous tutorial, but […]

Exercise: Syntax, Variables, and Numbers【练习语法变量和数字】

Exercises Welcome to your first set of Python coding problems! If this is your first time using Kaggle Notebooks, welcome! Notebooks are composed of blocks (called "cells") of text and code. Each of these is editable, though you’ll mainly be editing the code cells to answer some questions. To get started, try running the code […]

hello-python

This course covers the key Python skills you’ll need so you can start using Python for data science. The course is ideal for someone with some previous coding experience who wants to add Python to their repertoire. (If you’re a first-time coder, you are encouraged to check out our Intro to Programming course, which is […]

Scroll to top