0
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 5 years have passed since last update.

Python3 使用した関数メモ

Posted at

#Python3 使用した関数

##小文字を大文字に変換する関数

python01.py
s = input()
print("s.upper()")

##printで改行しない関数

python02.py
print("hello" , end = "")
print("world)

##入力input()を並列で記法

python03.py
x , y = input().split()

##特定の文字列を置換
str型で「AA」→「BB」

python04.py
print(s.replace('AA', 'BB'))

##行列

行列式
必要なライブラリ一覧

python05.py
import scipy.linalg as linalg
from scipy.optimize import minimize_scalar
import numpy as np

行列式

python06.py
a = linalg.det(mat)
print("行列式 : " + a)

逆行列

python07.py
b = linalg.inv(mat)
print("逆行列 : " + b)

固有値と固有ベクトル

python0.py
c , d = linalg.eig(mat)


print("固有値")
print("固有値 : " + c)

print("固有ベクトル")
print("固有ベクトル : " + d)

数値の切り捨て

import math

total = 5
n = 2
print(math.floor(total / n))
# 結果 
2

0
0
2

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
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?