MapleStory Finger Point

๐Ÿ’Ž Python/Python ๊ฐœ๋…์ •๋ฆฌ

ํ•จ์ˆ˜์™€ ๋ชจ๋“ˆ

HYEJU01 2024. 4. 8. 00:54

 

 

โ–ถ ํ•จ์ˆ˜ ๊ฐœ๋…

ํ•จ์ˆ˜๋Š” ์™ธ๋ถ€์— ๋ณ„๋„๋กœ ์กด์žฌ

๋ฉ”์„œ๋“œ๋Š” ํด๋ž˜์Šค ์•ˆ์— ์กด์žฌ

ํ•จ์ˆ˜๋ช… ()
# 9-1

coffee = 0

coffee = int(input("์–ด๋–ค ์ปคํ”ผ ๋“œ๋ฆด๊นŒ์š”?(1:๋ณดํ†ต, 2:์„คํƒ•, 3:๋ธ”๋ž™) "))

print()
print("#1. ๋œจ๊ฑฐ์šด ๋ฌผ์„ ์ค€๋น„ํ•œ๋‹ค.");
print("#2. ์ข…์ด์ปต์„ ์ค€๋น„ํ•œ๋‹ค.");

if coffee == 1 :
     print("#3. ๋ณดํ†ต์ปคํ”ผ๋ฅผ ํƒ„๋‹ค.")
elif coffee == 2 :
     print("#3. ์„คํƒ•์ปคํ”ผ๋ฅผ ํƒ„๋‹ค.")
elif coffee == 3 :
     print("#3. ๋ธ”๋ž™์ปคํ”ผ๋ฅผ ํƒ„๋‹ค.")
else :
     print("#3. ์•„๋ฌด๊ฑฐ๋‚˜ ํƒ„๋‹ค.\\n")

print("#4. ๋ฌผ์„ ๋ถ“๋Š”๋‹ค.");
print("#5. ์Šคํ‘ผ์œผ๋กœ ์ “๋Š”๋‹ค.");
print()
print("์†๋‹˜~ ์ปคํ”ผ ์—ฌ๊ธฐ ์žˆ์Šต๋‹ˆ๋‹ค.");
#9-2

## ์ „์—ญ ๋ณ€์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##
coffee = 0

## ํ•จ์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##
def coffee_machine(button) :
     print()
     print("#1. (์ž๋™์œผ๋กœ) ๋œจ๊ฑฐ์šด ๋ฌผ์„ ์ค€๋น„ํ•œ๋‹ค.");
     print("#2. (์ž๋™์œผ๋กœ) ์ข…์ด์ปต์„ ์ค€๋น„ํ•œ๋‹ค.");

     if button == 1 :
          print("#3. (์ž๋™์œผ๋กœ) ๋ณดํ†ต์ปคํ”ผ๋ฅผ ํƒ„๋‹ค.")
     elif button == 2 :
          print("#3. (์ž๋™์œผ๋กœ) ์„คํƒ•์ปคํ”ผ๋ฅผ ํƒ„๋‹ค.")
     elif button == 3 :
          print("#3. (์ž๋™์œผ๋กœ) ๋ธ”๋ž™์ปคํ”ผ๋ฅผ ํƒ„๋‹ค.")
     else :
          print("#3. (์ž๋™์œผ๋กœ) ์•„๋ฌด๊ฑฐ๋‚˜ ํƒ„๋‹ค.\\n")

     print("#4. (์ž๋™์œผ๋กœ) ๋ฌผ์„ ๋ถ“๋Š”๋‹ค.");
     print("#5. (์ž๋™์œผ๋กœ) ์Šคํ‘ผ์œผ๋กœ ์ “๋Š”๋‹ค.");
     print()

## ๋ฉ”์ธ ์ฝ”๋“œ ๋ถ€๋ถ„ ##
coffee = int(input("์–ด๋–ค ์ปคํ”ผ ๋“œ๋ฆด๊นŒ์š”?(1:๋ณดํ†ต, 2:์„คํƒ•, 3:๋ธ”๋ž™)"))
coffee_machine(coffee)
print("์†๋‹˜~ ์ปคํ”ผ ์—ฌ๊ธฐ ์žˆ์Šต๋‹ˆ๋‹ค.");

# 9-3

## ์ „์—ญ ๋ณ€์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##
coffee = 0

## ํ•จ์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##
def coffee_machine(button) :
     print()
     print("#1. (์ž๋™์œผ๋กœ) ๋œจ๊ฑฐ์šด ๋ฌผ์„ ์ค€๋น„ํ•œ๋‹ค.");
     print("#2. (์ž๋™์œผ๋กœ) ์ข…์ด์ปต์„ ์ค€๋น„ํ•œ๋‹ค.");

     if button == 1 :
          print("#3. (์ž๋™์œผ๋กœ) ๋ณดํ†ต์ปคํ”ผ๋ฅผ ํƒ„๋‹ค.")
     elif button == 2 :
          print("#3. (์ž๋™์œผ๋กœ) ์„คํƒ•์ปคํ”ผ๋ฅผ ํƒ„๋‹ค.")
     elif button == 3 :
          print("#3. (์ž๋™์œผ๋กœ) ๋ธ”๋ž™์ปคํ”ผ๋ฅผ ํƒ„๋‹ค.")
     else :
          print("#3. (์ž๋™์œผ๋กœ) ์•„๋ฌด๊ฑฐ๋‚˜ ํƒ„๋‹ค.\\n")

     print("#4. (์ž๋™์œผ๋กœ) ๋ฌผ์„ ๋ถ“๋Š”๋‹ค.");
     print("#5. (์ž๋™์œผ๋กœ) ์Šคํ‘ผ์œผ๋กœ ์ “๋Š”๋‹ค.");
     print()

## ๋ฉ”์ธ ์ฝ”๋“œ ๋ถ€๋ถ„ ##
coffee = int(input("A์†๋‹˜, ์–ด๋–ค ์ปคํ”ผ ๋“œ๋ฆด๊นŒ์š”?(1:๋ณดํ†ต, 2:์„คํƒ•, 3:๋ธ”๋ž™)"))
coffee_machine(coffee)
print("A์†๋‹˜~ ์ปคํ”ผ ์—ฌ๊ธฐ ์žˆ์Šต๋‹ˆ๋‹ค.")

coffee = int(input("B์†๋‹˜, ์–ด๋–ค ์ปคํ”ผ ๋“œ๋ฆด๊นŒ์š”?(1:๋ณดํ†ต, 2:์„คํƒ•, 3:๋ธ”๋ž™)"))
coffee_machine(coffee)
print("B์†๋‹˜~ ์ปคํ”ผ ์—ฌ๊ธฐ ์žˆ์Šต๋‹ˆ๋‹ค.")

coffee = int(input("C์†๋‹˜, ์–ด๋–ค ์ปคํ”ผ ๋“œ๋ฆด๊นŒ์š”?(1:๋ณดํ†ต, 2:์„คํƒ•, 3:๋ธ”๋ž™)"))
coffee_machine(coffee)
print("C์†๋‹˜~ ์ปคํ”ผ ์—ฌ๊ธฐ ์žˆ์Šต๋‹ˆ๋‹ค.")

[SELF STUDY 9-1]

# [SELF STUDY 9-1]

## ์ „์—ญ ๋ณ€์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##
coffee = 0

## ํ•จ์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##
def coffee_machine(button) :
     print()
     print("#1. (์ž๋™์œผ๋กœ) ๋œจ๊ฑฐ์šด ๋ฌผ์„ ์ค€๋น„ํ•œ๋‹ค.");
     print("#2. (์ž๋™์œผ๋กœ) ์ข…์ด์ปต์„ ์ค€๋น„ํ•œ๋‹ค.");

     if button == 1 :
          print("#3. (์ž๋™์œผ๋กœ) ์•„๋ฉ”๋ฆฌ์นด๋…ธ๋ฅผ ํƒ„๋‹ค.")
     elif button == 2 :
          print("#3. (์ž๋™์œผ๋กœ) ์นดํŽ˜๋ผ๋–ผ๋ฅผ ํƒ„๋‹ค.")
     elif button == 3 :
          print("#3. (์ž๋™์œผ๋กœ) ์นดํ‘ธ์น˜๋…ธ๋ฅผ ํƒ„๋‹ค.")
     elif button == 4 :
          print("#3. (์ž๋™์œผ๋กœ) ์—์Šคํ”„๋ ˆ์†Œ๋ฅผ ํƒ„๋‹ค.")
     else :
          print("#3. (์ž๋™์œผ๋กœ) ์•„๋ฌด๊ฑฐ๋‚˜ ํƒ„๋‹ค.\\n")

     print("#4. (์ž๋™์œผ๋กœ) ๋ฌผ์„ ๋ถ“๋Š”๋‹ค.");
     print("#5. (์ž๋™์œผ๋กœ) ์Šคํ‘ผ์œผ๋กœ ์ “๋Š”๋‹ค.");
     print()

## ๋ฉ”์ธ ์ฝ”๋“œ ๋ถ€๋ถ„ ##
coffee = int(input("๋กœ์ œ ์†๋‹˜, ์–ด๋–ค ์ปคํ”ผ ๋“œ๋ฆด๊นŒ์š”?(1:์•„๋ฉ”๋ฆฌ์นด๋…ธ, 2:์นดํŽ˜๋ผ๋–ผ, 3:์นดํ‘ธ์น˜๋…ธ, 4:์—์Šคํ”„๋ ˆ์†Œ)"))
coffee_machine(coffee)
print("๋กœ์ œ ์†๋‹˜~ ์ปคํ”ผ ์—ฌ๊ธฐ ์žˆ์Šต๋‹ˆ๋‹ค.")

coffee = int(input("๋ฆฌ์‚ฌ ์†๋‹˜, ์–ด๋–ค ์ปคํ”ผ ๋“œ๋ฆด๊นŒ์š”?(1:์•„๋ฉ”๋ฆฌ์นด๋…ธ, 2:์นดํŽ˜๋ผ๋–ผ, 3:์นดํ‘ธ์น˜๋…ธ, 4:์—์Šคํ”„๋ ˆ์†Œ)"))
coffee_machine(coffee)
print("๋ฆฌ์‚ฌ ์†๋‹˜~ ์ปคํ”ผ ์—ฌ๊ธฐ ์žˆ์Šต๋‹ˆ๋‹ค.")

coffee = int(input("์ œ๋‹ˆ ์†๋‹˜, ์–ด๋–ค ์ปคํ”ผ ๋“œ๋ฆด๊นŒ์š”?(1:์•„๋ฉ”๋ฆฌ์นด๋…ธ, 2:์นดํŽ˜๋ผ๋–ผ, 3:์นดํ‘ธ์น˜๋…ธ, 4:์—์Šคํ”„๋ ˆ์†Œ)"))
coffee_machine(coffee)
print("์ œ๋‹ˆ ์†๋‹˜~ ์ปคํ”ผ ์—ฌ๊ธฐ ์žˆ์Šต๋‹ˆ๋‹ค.")

coffee = int(input("์ง€์ˆ˜ ์†๋‹˜, ์–ด๋–ค ์ปคํ”ผ ๋“œ๋ฆด๊นŒ์š”?(1:์•„๋ฉ”๋ฆฌ์นด๋…ธ, 2:์นดํŽ˜๋ผ๋–ผ, 3:์นดํ‘ธ์น˜๋…ธ, 4:์—์Šคํ”„๋ ˆ์†Œ)"))
coffee_machine(coffee)
print("์ง€์ˆ˜ ์†๋‹˜~ ์ปคํ”ผ ์—ฌ๊ธฐ ์žˆ์Šต๋‹ˆ๋‹ค.")

โ–ถํ•จ์ˆ˜ ํ˜•์‹๊ณผ ํ™œ์šฉ

#9-5

## ํ•จ์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##

def calc(v1,v2,op) :
		result = 0
		if op == '+' :
			result = v1 + v2
		elif op == '-' :
			result = v1 - v2
		elif op == '*' :
			result = v1 * v2
		elif op == '/' :
			result = v1 / v2

		return result

## ์ „์—ญ ๋ณ€์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##
res = 0
var1, var2, oper =0,0,""

## ๋ฉ”์ธ ์ฝ”๋“œ ๋ถ€๋ถ„ ##
oper = input("๊ณ„์‚ฐ์„ ์ž…๋ ฅํ•˜์„ธ์š” (+,-,*,/):")
var1 = int(input("์ฒซ ๋ฒˆ์งธ ์ˆ˜๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”:"))
var2 = int(input("๋‘ ๋ฒˆ์งธ ์ˆ˜๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”:"))

rew = calc(var1,var2,oper)

print("##๊ณ„์‚ฐ๊ธฐ : %d %s %d = %d" % (var1,oper,var2,res))

[SELF STUDY 9-2]

## ํ•จ์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##

def calc(v1,v2,op) :
    result = 0
    if op == '+' :
        result = v1 + v2
    elif op == '-' :
        result = v1 - v2
    elif op == '*' :
        result = v1 * v2
    elif op == '/' :
        result = v1 / v2
    elif op == '**' :
        result = v1 ** v2

    return result

## ์ „์—ญ ๋ณ€์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##
res = 0
var1, var2, oper =0,0,""

## ๋ฉ”์ธ ์ฝ”๋“œ ๋ถ€๋ถ„ ##
oper = input("๊ณ„์‚ฐ์„ ์ž…๋ ฅํ•˜์„ธ์š” (+,-,*,/):")
var1 = int(input("์ฒซ ๋ฒˆ์งธ ์ˆ˜๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”:"))
var2 = int(input("๋‘ ๋ฒˆ์งธ ์ˆ˜๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”:"))

if var2 == 0 :
    print("0์œผ๋กœ ๋‚˜๋ˆ„์ง€ ๋งˆ์„ธ์š”")

else :
    res = calc(var1,var2,oper)
    print("##๊ณ„์‚ฐ๊ธฐ : %d %s %d = %d" % (var1,oper,var2,res))

โ–ถ์ง€์—ญ๋ณ€์ˆ˜ : ํ•จ์ˆ˜ ๋‚ด๋ถ€, ํ•œ์ •๋œ ์ง€์—ญ

  • ํ•จ์ˆ˜์— ๋‚ด๋ถ€์— ์„ ์–ธํ•œ๋‹ค.

โ–ถ์ „์—ญ๋ณ€์ˆ˜ : ํ”„๋กœ๊ทธ๋žจ ์ „์ฒด

  • ##์ „์—ญ ๋ณ€์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„##์— ์„ ์–ธํ•œ๋‹ค.
- ##ํ•จ์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##
- ##ํ•จ์ˆ˜ ๋ณ€์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„##
- ##์ „์—ญ ๋ณ€์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„##
- ##๋ฉ”์ธ ์ฝ”๋“œ ๋ถ€๋ถ„##

โ–ถ๊ธ€๋กœ๋ฒŒ ์˜ˆ์•ฝ์–ด

  • global a
  • ํ•จ์ˆ˜ ์•ˆ์˜ ๋ณ€์ˆ˜๋ฅผ ์ „์—ญ๋ณ€์ˆ˜๋กœ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์„๋•Œ

โ–ถ๋ฐ˜ํ™˜๊ฐ’์ด ์—†๋Š” ํ•จ์ˆ˜ (=ํ”„๋กœ์‹œ์ €๋ผ๊ณ  ๋ถ€๋ฆ„ , ๋ฐ˜ํ™˜๊ฐ’ ์žˆ์œผ๋ฉด ํ•จ์ˆ˜)

  • return ์ƒ๋žต
  • ๋ฐ˜ํ™˜๊ฐ’ ์—†์ด return ๋งŒ ์ž‘์„ฑ

โ–ถ๋ฐ˜ํ™˜๊ฐ’์ด ์—ฌ๋Ÿฌ๊ฐœ ํ•จ์ˆ˜

  • ๊ฐ’์„ 2๊ฐœ ์ด์ƒ ๋ฐ˜ํ™˜ํ•ด์•ผํ• ๋•Œ๋Š” ๋ฆฌ์ŠคํŠธ ์‚ฌ์šฉ
#๋ฆฌ์ŠคํŠธ ์‚ฌ์šฉ
reList.append(res1)
reList.append(res2)
return reList
#pass ์˜ˆ์•ฝ์–ด

if True: //์˜ค๋ฅ˜์ž„

else: 
	pirnt('๊ฑฐ์ง“')

-------------
if True: 
	pass
else: 
	pirnt('๊ฑฐ์ง“')

โ–ถ๋งค๊ฐœ๋ณ€์ˆ˜ ์ „๋‹ฌ

#๋งค๊ฐœ๋ณ€์ˆ˜์— ๋งž๊ฒŒ ์ธ์ž๋ฅผ ์ œ๋Œ€๋กœ ์ „๋‹ฌํ•ด์•ผ๋จ
def para_func(v1,v2,v3) : 

โ–ถ๋งค๊ฐœ๋ณ€์ˆ˜ ๊ธฐ๋ณธ๊ฐ’ ์„ค์ • ํ›„ ์ „๋‹ฌ

#๋งค๊ฐœ๋ณ€์ˆ˜ ์ธ์ž ๋งž์ง€ ์•Š์•„๋„ ๊ธฐ๋ณธ ๊ฐ’์œผ๋กœ ์“ฐ์ž„

def para_func(v1,v2,v3 = 0) : 

[SELF STUDY 9-3]

โ–ถ๋งค๊ฐœ๋ณ€์ˆ˜์˜ ๊ฐœ์ˆ˜๋ฅผ ์ง€์ •ํ•˜์ง€ ์•Š๊ณ  ์ „๋‹ฌ

    • para ๋กœ ๋งค๊ฐœ๋ณ€์ˆ˜ ์„ค์ •
#9-12
#๋งค๊ฐœ๋ณ€์ˆ˜๊ฐ€ ํŠœํ”Œํ˜•์‹์œผ๋กœ ๋„˜์–ด์™€ ํŠœํ”Œ์„ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐฉ์‹

## ํ•จ์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##
def para_func(*para) : 
     result = 0
     for num in para :
          result = result + num

     return result

## ์ „์—ญ ๋ณ€์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##
hap = 0

## ๋ฉ”์ธ ์ฝ”๋“œ ๋ถ€๋ถ„ ##
hap = para_func(10, 20)
print("๋งค๊ฐœ๋ณ€์ˆ˜๊ฐ€ 2๊ฐœ์ธ ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœํ•œ ๊ฒฐ๊ณผ ==> %d" % hap)
hap = para_func(10, 20, 30)
print("๋งค๊ฐœ๋ณ€์ˆ˜๊ฐ€ 3๊ฐœ์ธ ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœํ•œ ๊ฒฐ๊ณผ ==> %d" % hap)
# ๋”•์…”๋„ˆ๋ฆฌ ํ˜•์‹์œผ๋กœ ๋ฐ›์œผ๋ ค๋ฉด ** ๋ถ™์ด๊ธฐ

def para_func(**para) :
     for k in para.keys() :

#๋งค๊ฐœ๋ณ€์ˆ˜๊ฐ’๋„ ํ‚ค=๊ฐ’ ํ˜•์‹์œผ๋กœ ์ค˜์•ผ๋จ

para_func(ํŠธ์™€์ด์Šค = 9 , ์†Œ๋…€์‹œ๋Œ€ = 7 ..... 

[ํ”„๋กœ๊ทธ๋žจ 1]

import random

## ํ•จ์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##
def getNumber() :
     return random.randrange(1, 46)

## ์ „์—ญ ๋ณ€์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##
lotto = []
num = 0

## ๋ฉ”์ธ ์ฝ”๋“œ ๋ถ€๋ถ„ ##
print("** ๋กœ๋˜ ์ถ”์ฒจ์„ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค. ** \\n");

while True :
     num = getNumber()

     if lotto.count(num) == 0 :
          lotto.append(num)

     if len(lotto) >= 6 :
          break 

print("์ถ”์ฒจ๋œ ๋กœ๋˜ ๋ฒˆํ˜ธ ==>  ", end = '')
lotto.sort()
for i in range(0, 6) :
     print("%d  " % lotto[i], end = '')

โ–ถ๋ชจ๋“ˆ

  • ํ•จ์ˆ˜์˜ ์ง‘ํ•ฉ
  • ํ•จ์ˆ˜๋ฅผ ๋ณ„๋„์˜ ํŒŒ์ผ๋กœ ์ž‘์„ฑํ•˜์—ฌ ์ž„ํฌํŠธํ•˜๋Š” ๋ฐฉ๋ฒ•

โ–ถ ๋ชจ๋“ˆ์˜ ์ƒ์„ฑ๊ณผ ์‚ฌ์šฉ

####### Module1.py
## ํ•จ์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„ ##
def func1() :
	print("fun1() ํ˜ธ์ถœ๋จ")
def func2() :
	print("fun2() ํ˜ธ์ถœ๋จ")
def func3() :
	print("fun3() ํ˜ธ์ถœ๋จ")

###### A.py

import Module1

#ํ•จ์ˆ˜ํ˜ธ์ถœ ์•ž์— ๋ชจ๋“ˆ๋ช… ์ ๊ธฐ ์‹ซ๋‹ค๋ฉด => 
#from ๋ชจ๋“ˆ๋ช… import ํ•จ์ˆ˜1,ํ•จ์ˆ˜2,ํ•จ์ˆ˜3  
#from ๋ชจ๋“ˆ๋ช… import *

##๋ฉ”์ธ ์ฝ”๋“œ ๋ถ€๋ถ„ ##
Module1.func1()
Module1.func2()
Module1.func3()

#func1()
#func2()
#func3()

[ํ”„๋กœ๊ทธ๋žจ 2]

[practice 9]

def myRange(start, end, hop = 1) :
    retVal = start
    while retVal <= end :
        yield retVal
        retVal += hop
         
hap = 0
for i in myRange(1, 5, 2) :
    hap += i
print(hap)

[์‘์šฉ์˜ˆ์ œ 2]

from time import*
from datetime import*

##ํ•จ์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„##
def countDays(date1,date2):
    retDays=0
    year,month,day=date1.split('/')
    sDay=date(int(year),int(month),int(day))
    year,month,day=date2.split('/')
    eDay=date(int(year),int(month),int(day))
    diffDays=eDay-sDay
    retDays=diffDays.days
    return retDays

def getDay(t):
    weeks=['์›”','ํ™”','์ˆ˜','๋ชฉ','๊ธˆ','ํ† ','์ผ']
    return weeks[t.tm_wday]

##์ „์—ญ ๋ณ€์ˆ˜ ์„ ์–ธ ๋ถ€๋ถ„##
startDay,curDate,tm='','',None

##๋ฉ”์ธ ์ฝ”๋“œ ๋ถ€๋ถ„ ##
if __name__=="__main__":
    
    startDate = input('์‹œ์ž‘๋‚ ์งœ-->')
    tm = localtime()
    curDate=str(tm.tm_year)+'/'+str(tm.tm_mon)+'/'+str(tm.tm_mday)
    print(startDate,'๋ถ€ํ„ฐ ์˜ค๋Š˜(',curDate,')๊นŒ์ง€๋Š”',countDays(startDate,curDate),'์ผ์ด ์ง€๋‚ฌ์Šต๋‹ˆ๋‹ค')
    print('๊ทธ๋ฆฌ๊ณ  ์˜ค๋Š˜์€',getDay(tm),'์š”์ผ์ž…๋‹ˆ๋‹ค.')