日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

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

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷(xiāo)解決方案
Python 程序:計(jì)算兩個(gè)數(shù)平均值

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

成都創(chuàng)新互聯(lián)公司是一家集網(wǎng)站建設(shè),德城企業(yè)網(wǎng)站建設(shè),德城品牌網(wǎng)站建設(shè),網(wǎng)站定制,德城網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營(yíng)銷(xiāo),網(wǎng)絡(luò)優(yōu)化,德城網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專(zhuān)業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶(hù)成長(zhǎng)自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。

寫(xiě)一個(gè) Python 程序,求兩個(gè)數(shù)的平均值。這個(gè) Python 示例接受兩個(gè)整數(shù),并計(jì)算總和和平均值。

x = int(input("Please Enter the First Number  = "))
y = int(input("Please Enter the Second number = "))

sumOfTwo = x + y

avgOfTwo = sumOfTwo / 2

flooravgofTwo = sumOfTwo // 2

print('The sum of {0} and {1}       = {2}'.format(x, y, sumOfTwo))
print('The Average of {0} and {1}   = {2}'.format(x, y, avgOfTwo))
print('Floor Average of {0} and {1} = {2}'.format(x, y, flooravgofTwo))

Python 程序求兩個(gè)浮點(diǎn)數(shù)的平均值。

x = float(input("Please Enter the First Number  = "))
y = float(input("Please Enter the Second number = "))

sumOfTwo = x + y

avgOfTwo = sumOfTwo / 2

flooravgofTwo = sumOfTwo // 2

print('The sum of {0} and {1}       = {2}'.format(x, y, sumOfTwo))
print('The Average of {0} and {1}   = {2}'.format(x, y, avgOfTwo))
print('Floor Average of {0} and {1} = {2}'.format(x, y, flooravgofTwo))
Please Enter the First Number  = 22.9
Please Enter the Second number = 14.7
The sum of 22.9 and 14.7       = 37.599999999999994
The Average of 22.9 and 14.7   = 18.799999999999997
Floor Average of 22.9 and 14.7 = 18.0

名稱(chēng)欄目:Python 程序:計(jì)算兩個(gè)數(shù)平均值
網(wǎng)站路徑:http://m.5511xx.com/article/copgedg.html