생활코딩) Python 입문과정 1-16

2022. 6. 27. 11:43코딩/Python

728x90
반응형
print(-1)
print(0)
print(1) #int
print(1.1) #float

import math
print('math.sqrt(4) =', math.sqrt(4))
print('math.pow(4,2) =', math.pow(4,2))

import random
print('random.random.() =', random.random())
print('Hello world')
print("Hello world")
print('''
Hello
World
''')
students = ["egoing", "sori", "maru"]
grades = [2, 1, 4]
print("students[1]", students[1])
print("len(students)", len(students))
print("min(grades)", min(grades))
print("max(grades)", max(grades))

import statistics
print("statistics.mean(grades)", statistics.mean(grades))

import random
print("random.chocie(students)", random.choice(students))
 
 
name = 'egoing'
message = 'hi, '+name+' .... bye, '+name+''
print(message)

 

 

728x90
반응형

'코딩 > Python' 카테고리의 다른 글

Python) 규칙 이용해서 비밀번호 생성하기  (0) 2022.06.29
생활코딩) Python 제어문 공부  (0) 2022.06.27
[Python] Factorial 기능 구현해보기  (0) 2022.06.24
6/21 제어문  (0) 2022.06.21
6/21  (0) 2022.06.21