MapleStory Finger Point

๐Ÿ’Ž Python/Python_Code

๊ฐ„๋‹จ ๊ณ„์‚ฐ๊ธฐ ํ”„๋กœ๊ทธ๋žจ (์‚ฌ์น™์—ฐ์‚ฐ) - ํŒŒ์ด์ฌ for Beginner (2ํŒ)

HYEJU01 2024. 3. 18. 15:51

๊ฐ„๋‹จ ์‚ฌ์น™์—ฐ์‚ฐ ๊ณ„์‚ฐ๊ธฐ ํ”„๋กœ๊ทธ๋žจ

a = int(input("A ๊ฐ’์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š” : "))
b = int(input("B ๊ฐ’์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š” : "))
result = a+b
print(a,"+",b,"=",result)
result = a-b
print(a,"-",b,"=",result)
result = a*b
print(a,"*",b,"=",result)
result = a/b
print(a,"/",b,"=",result)

 

 


โœ…input() ํ•จ์ˆ˜๋Š” ๊ฐ’์„ ์ž…๋ ฅ๋ฐ›์„ ๋•Œ ๋ฌธ์ž์—ด๋กœ ์ทจ๊ธ‰ํ•˜์—ฌ ๊ฐ’์„ ๋ฐ›๋Š”๋‹ค.

๋ฌธ์ž์—ด์„ ๋”ํ•˜๋ผ๋Š” ๋ช…๋ น์„ ์ฒ˜๋ฆฌํ•˜์ง€ ๋ชปํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์˜ค๋ฅ˜!

a = input()
b = input()
result = a+b
print(a,"+",b,"=",result)

 

 

 

โœ… ๋ฌธ์ž์—ด -> ์ •์ˆ˜๋กœ ๋ณ€ํ™˜ํ•ด์ฃผ๋ฉด ๋œ๋‹ค.

a = int(input())
b = int(input())
result = a+b
print(a,"+",b,"=",result)
result = a-b
print(a,"-",b,"=",result)

 

 

 

 

โœ… input("") ํ˜•ํƒœ๋กœ ๊ฐ’ ์ž…๋ ฅ ๋ฐ›๊ธฐ์ „ ์„ค๋ช…์„ ์ ์„ ์ˆ˜ ์žˆ์Œ

a = int(input("A ๊ฐ’์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š” : "))
b = int(input("B ๊ฐ’์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š” : "))
result = a+b
print(a,"+",b,"=",result)
result = a-b
print(a,"-",b,"=",result)