import math #모듈 불러오기
import random
x = 'Hi!' #전역변수
def my_func():
#x = 'Hi!' 지역변수
print(x)
my_func()
print(x)
#사투리 번역기 만들기
greeting = '밥 먹었니?'
print('서울:', greeting)
def changwon():
greeting = '밥 뭇나?'
print('창원:', greeting)
changwon()
print(greeting)
#함수와 메서드
print("hello")
list = [1,2,3]
list.append(4) #메서드
print(list)
#모듈
a = random.randrange(1, 10)
print(a)
print(math.pi)
b = random.choice(['a', 'b', 'c', 'd', 'e'])
print(b)
To embed this project on your website, copy the following code and paste it into your website's HTML: