日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

代做TUCH.UB25、代寫python語言程序
代做TUCH.UB25、代寫python語言程序

時間:2024-10-20  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



TECH.UB.25: Intro to Python Programming: Assignment # 4
 
Scenario:  Campus Pizza is really taking off and your co-founders love the programs you have built.  They want you to build an object-oriented program for their beverages.   Campus pizza has two beverage options: Soda from the soda fountain, and home-made lemonade which is available as sweetened or unsweetened.   Both beverages are $1.50 for a small, $1.75 for a medium and $2.00 for a large.  
 
Program Guidelines: 
1) Superclass: Create a superclass called “Beverage” that has two attributes: “size” and “price”.  “Beverage” should also have a method called “display” that prints out a statement of the size and price of the drink.  
 
2) Subclasses: 
a) Soda Subclass: Create a subclass “Soda” that inherits all the attributes and methods of Beverage.  
b) Lemonade Subclass: Create a subclass “Lemonade” that inherits all the attributes of subclass, but add an attribute called “sugar” for whether the customer wants the lemonade sweetened or unsweetened.  Additionally, edit the display function so that it also shows the sugar status.   
 
3) Functions: Outside of the classes, create the following functions:
a) Title: Create a function called “title” that prints the title “The Beverage Program”  
b) Closing: Create a function called “closing” that prints the number of drinks created and thanks them for using the program 
c) Getting Size:  Create a function called “get_size” that asks the user what size beverage the user wants (S, M, L) and assigns it to a variable called “size_input”.   If the user enters an invalid value, assume the size is a Small.  Based on their input, return a variable called “size” from the function. 
d) Get Sugar:  Create a function called “get_sugar” that asks the users who want a lemonade whether they would like their lemonade Sweetened or Unsweetened (S or U) and assigns it to a variable called “sugar_input”.  Return a variable called sugar with the phrase “Sweetened or Unsweetened” based on user status.  If the user doesn’t put an “S”, default to Unsweetened.   
e) Get Price:  Create a function called “get_price” that returns a variable called “price” based on the size of the drink.  
 
4) Main: 
- Nest all your functions inside a main function. 
- Start by creating an empty list called “drinks.” 
- Create a loop that allows the user to create orders for multiple drinks.  
- Ask the user to create a drink by asking for the drink type, “S” for soda, “L” for lemonade, “0” to exit, and then proceed to get the size of the drink. (The reason this needs to be inside the main function vs. its own function is because the “0” will break the main program loop). 
- If the user enters an incorrect value for the drink type or size, end the program and ask them to run it again.  
- If the drink is a lemonade, ask the user if they would like it sweetened “S” or unsweetened “U”. If the user enters something else, assume it is unsweetened.  
- After the user has created all of the drink, assign it to an object.  Add this object to the “drinks” list.  
- When the user enters “0” and is done creating new drinks,  print all the objects in the “drinks” list.  For each drink in the list “drinks”, show the drink number, type, price and sweetness (for lemonades).  
- Finally, close the program and show the user the number of drinks they created.   
 
Program Console: 
______________________
The Beverage Program
 
Soda or a lemonade? Enter S, L or 0 for no drinks: S
What size would you like?  Enter S, M or L: M
Would you like to create another drink? y/n? y
 
Soda or a lemonade? Enter S, L or 0 for no drinks: Q
Incorrect drink type.  Please enter S or L: L
What size would you like?  Enter S, M or L: L
Sweetened or Unsweetened?  Enter S or U: U
Would you like to create another drink? y/n? y
 
Soda or a lemonade? Enter S, L or 0 for no drinks: L
What size would you like?  Enter S, M or L: S
Sweetened or Unsweetened?  Enter S or U: S
Would you like to create another drink? y/n? n
 
Drink 1: Soda
Size: Medium   Price: $1.75
 
Drink 2: Lemonade
Size: Large   Price: $2.00    Sugar: Unsweetened
 
Drink 3: Lemonade
Size: Small   Price: $1.50    Sugar: Sweetened
 
You created 3 drink orders. Thanks for using this program!

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp






 

掃一掃在手機打開當前頁
  • 上一篇:CE243程序代做、代寫C++編程語言
  • 下一篇:代寫SCC.369、C++語言編程代做
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 酒店vi設計 deepseek 幣安下載 AI生圖 AI寫作 aippt AI生成PPT 阿里商辦

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

      <em id="rw4ev"></em>

        <tr id="rw4ev"></tr>

        <nav id="rw4ev"></nav>
        <strike id="rw4ev"><pre id="rw4ev"></pre></strike>
        欧美国产1区2区| 久久久久久久激情视频| 国产精品久99| 国产精品视频观看| 宅男在线国产精品| 欧美国产三级| 性欧美超级视频| 在线看国产日韩| 国产精品视频午夜| 在线视频观看日韩| 亚洲乱码日产精品bd| 国产精品一区二区a| 亚洲天堂视频在线观看| 一区二区电影免费在线观看| 欧美系列电影免费观看| 性娇小13――14欧美| 欧美日韩国产精品一卡| 91久久精品一区| 久久蜜桃资源一区二区老牛| 国产精品视频一区二区高潮| 欧美涩涩网站| 欧美成人69av| 亚洲欧美中文日韩v在线观看| 亚洲欧洲精品一区二区精品久久久| 宅男66日本亚洲欧美视频| 国产精品一区毛片| 国产精品免费网站在线观看| 欧美一级久久| 欧美日韩在线视频一区二区| 国产日产欧美a一级在线| 狠狠色狠色综合曰曰| 亚洲一区二区三区乱码aⅴ蜜桃女| 99国产精品99久久久久久粉嫩| 免费观看久久久4p| 亚洲视频观看| 亚洲一区二区三区高清| 日韩亚洲欧美中文三级| 在线欧美三区| 亚洲免费伊人电影在线观看av| 香港久久久电影| 最新亚洲电影| 久久免费视频这里只有精品| 国产在线麻豆精品观看| 亚洲天堂av电影| 亚洲经典在线看| 欧美jizz19hd性欧美| 国产精品久久久久久久久果冻传媒| 国产色产综合产在线视频| 一区二区欧美亚洲| 欧美国产日产韩国视频| 亚洲美洲欧洲综合国产一区| 久久精品亚洲精品国产欧美kt∨| 亚洲电影在线| 欧美午夜在线观看| 国产精品v一区二区三区| 久久免费精品日本久久中文字幕| 欧美精品在线一区二区三区| 亚洲一区二区在线播放| 国产精品嫩草影院av蜜臀| 亚洲三级电影全部在线观看高清| 久久精品99国产精品酒店日本| 在线看一区二区| 亚洲综合首页| 国产精品久久久久aaaa| 国产欧美在线看| 亚洲午夜免费视频| 日韩视频中文字幕| 欧美激情一区二区三区在线视频观看| 国产精品捆绑调教| 国产精品嫩草影院av蜜臀| 亚洲精品综合久久中文字幕| 老司机午夜精品视频| 亚洲国产日韩欧美在线动漫| 亚洲欧美成人一区二区三区| 国产欧美日韩亚州综合| 国产日韩欧美综合在线| 一区二区三区视频观看| 欧美精品一区二区三区视频| 久久久欧美一区二区| 欧美日本免费| 久久久久国产精品午夜一区| 最新日韩在线视频| 亚洲电影免费观看高清| 国产亚洲精品久久久久久| 国内精品福利| 欧美亚洲综合久久| 亚洲狼人精品一区二区三区| 伊人久久久大香线蕉综合直播| 另类尿喷潮videofree| 欧美三区免费完整视频在线观看| 亚洲电影免费在线观看| 久久aⅴ国产欧美74aaa| 欧美与黑人午夜性猛交久久久| 午夜视频在线观看一区| 国产日韩精品久久| 国产精品久久久久久久浪潮网站| 欧美午夜视频网站| 精品电影在线观看| 一本到高清视频免费精品| 欧美在线日韩精品| 欧美日韩一区综合| 欧美成人精品福利| 国产亚洲女人久久久久毛片| 欧美成人伊人久久综合网| 亚洲美女在线国产| 久久久999成人| 国产一区二区三区精品欧美日韩一区二区三区| 中文欧美字幕免费| 久久久女女女女999久久| 午夜宅男久久久| 日韩亚洲一区在线播放| 久久九九有精品国产23| 欧美福利一区二区| 日韩视频二区| 久久se精品一区二区| 欧美成人xxx| 欧美福利精品| 永久91嫩草亚洲精品人人| 国产主播在线一区| 久久精品国产2020观看福利| 欧美日韩免费一区二区三区| 在线看片第一页欧美| 狠狠狠色丁香婷婷综合激情| 99精品视频一区二区三区| 久久精品国内一区二区三区| 久久久久女教师免费一区| 亚洲国产成人在线播放| 欧美一区二区福利在线| 国产精品久久毛片a| 欧美日韩国产另类不卡| 国产女优一区| 国产精品扒开腿做爽爽爽软件| 另类酷文…触手系列精品集v1小说| 亚洲欧美日韩精品综合在线观看| 久久久亚洲综合| 亚洲免费观看高清完整版在线观看熊| 亚洲小少妇裸体bbw| 亚洲免费电影在线| 国产午夜精品久久久| 欧美承认网站| 国产女主播一区二区三区| 国产精品黄色在线观看| 中文亚洲字幕| 欧美日韩精品在线视频| 免费观看在线综合| 黄色成人在线免费| 亚洲影音先锋| 欧美高清视频一区| 亚洲影院在线观看| 久久夜色精品一区| 国产精品久久久久久久久借妻| 欧美日韩一区二区在线播放| 欧美午夜精品久久久久久孕妇| 欧美日韩国产成人在线免费| 国产乱码精品一区二区三区忘忧草| 国产精品美女诱惑| 欧美日韩黄色大片| 欧美精品v日韩精品v韩国精品v| 国产亚洲一区二区三区| 亚洲一级片在线看| 欧美视频你懂的| 国产一区二区三区在线免费观看| 亚洲午夜小视频| 国产精品久久久久久久久久免费|