#주석의 설명이나 코드를 보고 빈칸 ???을 채우세요.

print('----문제1----')
x = 10
y = 3

def func1():
    y = 5
    print(x + y)   #출력 결과 : ???

def func2():
    ??? z        # z를 전역 변수로 선언
    z = 20
    print(z)          #출력 결과 : ???
    
z = 30

print(??) #출력 결과 : 10
print(??) #출력 결과 : 3
print(??) #출력 결과 : 30
??? #함수 func1 호출
??? #함수 func2 호출
print(x) #출력 결과 : ???
print(y) #출력 결과 : ???
print(z) #출력 결과 : ???


print('----문제2----')
import random as r
import math

nums = [3, 6, 9, 12, 15]

a = ???(nums)     # nums 리스트에서 무작위 1개 선택
b = ???(nums, 2)  # nums 리스트에서 무작위 2개 선택
c = math.???(a)          # a의 제곱근
d = round(math.???, 3)     # 원주율 소수 셋째 자리까지 반올림

print("a =", a)
print("b =", b)
print("c =", c)
print("d =", d)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: