第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

為一名推銷員開(kāi)發(fā) Python 項(xiàng)目。出現(xiàn)“無(wú)法分配給操作員”錯(cuò)誤

為一名推銷員開(kāi)發(fā) Python 項(xiàng)目。出現(xiàn)“無(wú)法分配給操作員”錯(cuò)誤

叮當(dāng)貓咪 2023-12-26 15:20:50
我正在為一名推銷員開(kāi)發(fā)一個(gè) Python 項(xiàng)目。該項(xiàng)目根據(jù)每周的工作時(shí)間和每周銷售傭金的百分比計(jì)算工資,并將它們加在一起得到銷售員的每周總工資。我遇到的問(wèn)題是將銷售額除以他們從每次銷售中獲得的百分比。錯(cuò)誤是“無(wú)法分配給操作員”#Prompt user for the number of hours worked that week hours_worked = int(input("How many hours did you work this week? \n"))#Define hourly wageper_hour = 30#Multiply the hourly wage and hours worked that weektotal_hours_pay = hours_worked * per_hour#Prompt user for the number of sales made that weeksales_made = int(input("How many sales did you make this week? \n"))#Amount of each salesales = 250#Determine commission of each sale25 / sales = commission#Multiply the commission times the amount of sales made to retrieve amount of total commission paytotal_sales_pay = sales_made * commission#Add total commission pay from sales with the total hours pay to get the weekly totaltotal_week_pay = total_sales_pay + total_hours_payprint(total_week_pay)
查看完整描述

2 回答

?
largeQ

TA貢獻(xiàn)2039條經(jīng)驗(yàn) 獲得超8個(gè)贊

你寫(xiě)了:

25 / sales = commission

但是當(dāng)給變量賦值時(shí),需要將變量放在語(yǔ)句的開(kāi)頭。

嘗試

commission = 25 / sales


查看完整回答
反對(duì) 回復(fù) 2023-12-26
?
阿波羅的戰(zhàn)車(chē)

TA貢獻(xiàn)1862條經(jīng)驗(yàn) 獲得超6個(gè)贊

25 / sales = commission這一行拋出錯(cuò)誤。我想應(yīng)該是的comission = 25 / sales。你嘗試將 的值賦值comission給其結(jié)果25 / sales不起作用。



查看完整回答
反對(duì) 回復(fù) 2023-12-26
  • 2 回答
  • 0 關(guān)注
  • 205 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)