import math
import random
x = "Hi"
def my_func():
print(x)
my_func() #함수 안에서
print(x) #함수 밖에서
def my_func2():
y = "Bye"
print(y)
my_func2() #함수 안에서
#print(y) #함수 밖에서는 오류!
greeting = '밥 먹었니?'
print('서울: ', greeting)
def busan():
greeting = '밥 뭇나?'
print('부산: ', greeting)
busan()
print(greeting)
a = [1, 2, 3]
a.append(4)
print(random.randrange(1, 11))
print(math.pi)
print(math.ceil(2.4))
print(math.ceil(5.1))
print(math.pow(5, 9))
print(random.choice([1, 2, '가', '나']))
b = "abcedf"
print(random.choice(b))
print(random.sample(b, 3))
print(random.sample(range(1,101),5))
To embed this project on your website, copy the following code and paste it into your website's HTML: