日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Python程序:兩個(gè)數(shù)相減

創(chuàng)新互聯(lián)python教程:

創(chuàng)新互聯(lián)專注于昆山企業(yè)網(wǎng)站建設(shè),成都響應(yīng)式網(wǎng)站建設(shè)公司,成都做商城網(wǎng)站。昆山網(wǎng)站建設(shè)公司,為昆山等地區(qū)提供建站服務(wù)。全流程按需設(shè)計(jì)網(wǎng)站,專業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,創(chuàng)新互聯(lián)專業(yè)和態(tài)度為您提供的服務(wù)

寫一個(gè) Python 程序來減去兩個(gè)數(shù)字。

num1 = 128
num2 = 256

sub = num1 - num2
print('The Result of subtracting {0} from {1} = {2}'.format(num2,num1,sub))
The Result of subtracting 256 from 128 = -128

這個(gè) Python 程序接受兩個(gè)整數(shù)值,并從另一個(gè)數(shù)中減去一個(gè)數(shù)。

num1 = int(input("Please Enter the First Number  = "))
num2 = int(input("Please Enter the second number = "))

sub = num1 - num2
print('The Result of subtracting {0} from {1} = {2}'.format(num2,num1,sub))

其他產(chǎn)出很少

Please Enter the First Number  = 11
Please Enter the second number = 43
The Result of subtracting 43 from 11 = -32

Please Enter the First Number  = 99
Please Enter the second number = 23
The Result of subtracting 23 from 99 = 76

Python 編程使用函數(shù)減去兩個(gè)數(shù)。

def subtractTwoNum(a, b):
    return a - b

num1 = int(input("Please Enter the First Number  = "))
num2 = int(input("Please Enter the second number = "))

sub = subtractTwoNum(num1, num2)
print('The Result of subtracting {0} from {1} = {2}'.format(num2,num1,sub))
Please Enter the First Number  = 12
Please Enter the second number = 49
The Result of subtracting 49 from 12 = -37

Please Enter the First Number  = 70
Please Enter the second number = 37
The Result of subtracting 37 from 70 = 33

網(wǎng)頁標(biāo)題:Python程序:兩個(gè)數(shù)相減
網(wǎng)頁網(wǎng)址:http://www.dlmjj.cn/article/djpdihj.html