0
1

More than 3 years have passed since last update.

Python基礎 if文

Last updated at Posted at 2019-12-22

Python基礎①

アウトプット用にメモ

if文


number = 40
if number > 30:
     print "hello world!"
     print "Hello World!"

比較演算子 > < >= <= == != 論理演算子 and or not


if number > 50 and number < 70:
     print "hello world!"
     print "Hello World!"
if 50 < number <70
     print print "hello world!"
     print "Hello World!"`

number = 60
if number > 50:
     print "hello world!"
elif number > 30:
     print "Hello World!"
else:
     print "HELLO WORLD"

print "yes" if number > 60 else "no"

エンジニア転職活動参考サイト

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1