天天看點

PTA-浙大版《Python 程式設計》AC解答彙總-第一章

# 第1章-1 從鍵盤輸入兩個數,求它們的和并輸出 (30分)
def demo_1_1():
    a=int(input())
    b=int(input())
    print(a+b)


# 第1章-2 從鍵盤輸入三個數到a,b,c中,按公式值輸出 (30分)
def demo_1_2():
    a,b,c=map(int, input().split())
    print (b*b-4*a*c)


# 第1章-3 輸出“Python語言簡單易學” (10分)
def demo_1_3():
    s="Python語言簡單易學"  
    print(s.encode("utf-8"))