1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【備忘録】Python 基本

Posted at

pythonを実行

$ python ファイル名
$ python hello.py

基本構文

# 出力
print("hello")

# 変数
hello = "hello world"
print(hello)

# データ型確認
print(type(hello))

# 配列
name =["tanaka","yamada"]
print(name[0])

# 条件分岐
age = 5
if age >= 20:
  print("adult")
elif age ==0:
  print("body")
else:
  print("child")

# 繰り返し
for i in range(10):
  print(i)
1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?