Get the App
SLTechnology News&Howtos  ›  Development  › 

Introduction to the example usage of judgment and Loop sentences in Python

Shulou Source: shulou.com Published: 2022-06-03 17:42:35 09月12日 Update

This article mainly explains "the introduction of the example usage of judgment and circular sentence in Python". The content of the explanation in this article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the introduction of example usage of judgment and circular sentence in Python".

1 、 if 、 elif 、 else

Age=17

If age > = 18 and age100:

Print ("longevity baby? ‍")

Else:

Print ("am I still a baby?")

Console print results:

I'm still a baby?

2. While cycle

Age=0while age

Tags: Loops instances consoles results controls statements babies learning content data articles or in addition multiplication multiplication tables functions that is ideas situations meaning Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Shulou Tech Info macOS Xiaomi MariaDB