1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | def print_counter(): global counter # ÇÔ¼ö ¿ÜºÎÀÇ Àü¿ªº¯¼ö counter¸¦ »ç¿ëÇÏ°Ú´Ù´Â ¼±¾ð counter = 200 print('counter =', counter) # ÇÔ¼ö ³»ºÎÀÇ counter °ª counter = 100 print_counter() print('counter =', counter) # ÇÔ¼ö ¿ÜºÎÀÇ counter °ª ################################################################ def calculate_area(radius): global area area = 3.14 * radius ** 2 return area = 0 r = float(input("¿øÀÇ ¹ÝÁö¸§: ")) calculate_area(r) print(area) | cs |