MapleStory Finger Point Cute Line Smiley Blinking Hello Kitty Angel MapleStory Finger Point

๐Ÿ’Ž Python/Python_Code

หšโ‚Šโœฉโ€งโ‚Š ํ•ฉ๊ณ„ ๋ฐ˜๋ณต ๊ณ„์‚ฐํ•˜๊ธฐ - ํŒŒ์ด์ฌ for Beginner (2ํŒ) หšโ‚Šโœฉโ€งโ‚Š

HYEJU01 2024. 3. 20. 01:19

โœ… ๋‘ ์ˆซ์ž์˜ ํ•ฉ๊ณ„ ๋ฐ˜๋ณต ๊ณ„์‚ฐ  (Ctrl + C ๋ˆ„๋ฅผ๋–„๊นŒ์ง€ ๋ฐ˜๋ณต)

sum =0
a,b = 0,0

while (True) :
    a = int(input("์ฒซ๋ฒˆ์งธ ์ˆซ์ž"))
    b = int(input("๋‘๋ฒˆ์งธ ์ˆซ์ž"))

    sum = a+b
    print ("a+b ํ•ฉ๊ณ„ : %d" % sum);

 


โœ… ๋‘ ์ˆซ์ž์˜ +-*/  (Ctrl + C ๋ˆ„๋ฅผ๋–„๊นŒ์ง€ ๋ฐ˜๋ณต)

 

sum =0
a,b = 0,0
ch=""

while (True) :
    a = int(input("์ฒซ๋ฒˆ์งธ ์ˆซ์ž : "))
    b = int(input("๋‘๋ฒˆ์งธ ์ˆซ์ž : "))
    ch = input("์—ฐ์‚ฐ์ž ์ž…๋ ฅ : ")

    if (ch == "+") :
         print ("a+b  : %d" % (a+b));

    elif (ch == "-") :
        print ("a-b  : %d" % (a-b));

    elif (ch == "*") :
        print ("a*b  : %d" % (a*b));

    elif (ch == "/") :
        print ("a/b  : %d" % (a/b));

    elif (ch == "%") :
        print ("a%b  : %d" % (a%b));

    elif (ch == "//") :
        print ("a//b  : %d" % (a//b));
        
    elif (ch == "**") :
        print ("a**b  : %d" % (a**b));

    else :
        print ("์—ฐ์‚ฐ์ž ์ž˜๋ชป ์ž…๋ ฅ")


โœ… break ๋ฌธ ์ถ”๊ฐ€

sum =0
a,b = 0,0
ch=""

while (True) :
    a = int(input("์ฒซ๋ฒˆ์งธ ์ˆซ์ž : "))
    b = int(input("๋‘๋ฒˆ์งธ ์ˆซ์ž : "))
    ch = input("์—ฐ์‚ฐ์ž ์ž…๋ ฅ : ")

    if (ch == "+") :
         print ("a+b  : %d" % (a+b));

    elif (ch == "-") :
        print ("a-b  : %d" % (a-b));

    elif (ch == "*") :
        print ("a*b  : %d" % (a*b));

    elif (ch == "/") :
        print ("a/b  : %d" % (a/b));

    elif (ch == "%") :
        print ("a%b  : %d" % (a%b));

    elif (ch == "//") :
        print ("a//b  : %d" % (a//b));
        
    elif (ch == "**") :
        print ("a**b  : %d" % (a**b));

    elif (ch == "$") :
        break;

    else :
        print ("์—ฐ์‚ฐ์ž ์ž˜๋ชป ์ž…๋ ฅ")
        
print ("๋")