国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

ENGG1330代做、Python程序設計代寫

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



ENGG1330 Computer Programming I Assignment 1
Page 1 of 7
ENGG 1330 Computer Programming I (2**4 Semester 2)
Assignment 1
Due date: 9:30am, 2**March-2023 (Thu)
Late submission: 20% deduc4on per day
Important notes
• Only Python built-in features should be used in doing this assignment. It is
unnecessary to import any modules to do this assignment. Zero mark will be given
to programs that import any modules. If you are unsure, feel free to contact us for
clarifica=on.
• While programming style is not graded, you are highly recommended to use func=ons
to factor your program, write clear and =dy codes, e.g., descrip=ve comments,
concise and clear naming, appropriate spacing.
Submission
• Virtual Programming Lab (VPL) will be set up for submission and tes=ng. Only the last
submission will be considered as the final submission.
• Test your program thoroughly before the deadline. Your programs must generate
output according to the required formats, e.g., no extra text/space. If you are
unsure about the requirements, feel free to contact us for clarifica=on.
• The test cases provided in VPLs only check whether your programs meet the basic
requirements. You should test the robustness of your programs by crea=ng more test
cases on your own. Your programs will be assessed with another set of private test
cases.
• 20% will be deducted from the final mark for every 24-hour aOer the submission due
date.
• Do not submit any program aOer the due date if your work is final. Any submission
aOer the due date is regarded as late submission.
Plagiarism
• Confirmed plagiarism cases (detected by the system) will get zero mark and subject
to disciplinary ac=ons. The penalty applies to the source provider(s) as well. In other
words, students who submit same/highly similar programs will all get zero mark.
Students have full responsibility to protect their programs from being accessed by
others.
• Every year in the past, several students had found engaged in plagiarism. They all got
zero mark for the assignment and a warning leWer issued by the Department Head.
Questions
• If you have any ques=ons, please send email to Mr. Zhang Jierui
(jrzhang@eee.hku.hk) or Mr. Huang Binxiao (bxhuang@eee.hku.hk) who oversee this
assignment.
ENGG1330 Computer Programming I Assignment 1
Page 2 of 7
Problem 1 (20%)
You are running a dessert shop selling mousse cakes and macarons at a price of $35 and $20,
respec;vely. It takes 5 minutes to make a mousse cake and 8 minutes to make a macaron. There
are dine-in and takeaway op;ons, with a 10% service charge for dine-in. There is no takeaway for
macarons, and so, any takeaway macarons will be removed from the orders.
Now, write a program to read all the orders un;l the input equals -1, indica;ng the end of entry. For
each order, the user enters three numbers separated by a white space in a line before hiJng the
'enter' key. The first number is the number of mousse cakes in the order, the second number is the
number of macarons, and the last number is either '0' or '1', where '0' represents dine-in and '1'
represents 'takeaway'. ANer reading all the orders, the program generates a daily sales report
summarizing the total number of mousse cakes and macarons sold, the (total) sales amount, the
(total) service charges and the (total) produc;on ;me.
Detailed format requirements of the daily sales report:
• The width of the report is 40 characters.
• The heading is at the center with a leading white space and a trailing white space, filled with
'*' on both sides.
• In each row, the name is leN aligned, and the value is right aligned.
• Prefix the sales amount and service charges with a '$' sign. The sales amount is in dollar and
the service charges are in 10-cent (i.e., 1 decimal place).
• The produc;on ;me is in number of hours and number of minutes. Add ‘s’ to the unit when
the number is plural and do not display the number '0' and its unit.
Samples
Takeaway macarons are
removed from the order
Service charges are in 10-cent
(i.e., 1 decimal place)
Add ‘s’ to the unit when the
number is plural and do not
display the number '0' and its unit.
Add ‘s’ to the unit when the
number is plural and do not
display the number '0' and its unit.
ENGG1330 Computer Programming I Assignment 1
Page 3 of 7
Problem 2 (20%)
There is a rectangular grid with height h and width w, and a word is embedded in the grid with
empty spaces filled with the character "#". The word is stored either horizontally, ver;cally, or
diagonally and the word starts with a character in uppercase and other characters in lowercase. So,
the character in uppercase determines the reading direc;on of the word. You need to find and print
the whole word in uppercase.
Write a program to ask the user to input the height h in the first line, and the width w in the second
line, then, the grid itself consis;ng of h lines of strings, each string of length w characters. Lastly,
print the whole word in uppercase.
Samples
The word "Program" is embedded
horizontally in a 8 X 8 grid
The word "Engineering" is embedded
diagonally in a 12 X 12 grid
ENGG1330 Computer Programming I Assignment 1
Page 4 of 7
Problem 3 (25%)
In a magical world, there are families living on a horizontal straight line, viz., an x-axis. Every family
has a unique family ID i (posi;ve integer) and a unique coordinate xi (non-nega;ve integer) and the
distance between two neighboring families, i and j, is |xi - xj|.
You are a magical postman and need to deliver mail from one family to another family, possibly via
other families. Some magic beans will be consumed as follows when you move from one family i to a
neighboring family j. And you want to minimize the number of magic beans consumed for every
delivery (of course!).
• If family j is the nearest neighbor of family i or family j is the only neighbor of family i, only 1
magic bean is consumed, since every family has a magic track to its nearest or only neighbor.
• Otherwise, the number of magic beans consumed equals the distance between the two
families, i.e., |xi - xj|.
It is guaranteed that every family has one unique nearest neighbor. But be reminded that "j is the
nearest one of i" doesn't necessarily imply "i is the nearest one of j", you can think and find why.
Write a program for the postman with the following inputs and outputs.
In the first line, the number of families N is inpueed. Then, the family ID i and its coordinate xi in the
form of "i xi" are inpueed in the next N lines. The family IDs are unique and in the range of 1, 2, ..., N,
but they may not appear in order.
Next, the number of deliveries M is inpueed, followed by M lines of deliveries in the form of "i k"
meaning that a mail has to be delivered from family i to family k.
Lastly, your program has to output M lines, where each line contains an integer, which is the
minimum number of magic beans consumed to deliver the corresponding mail.
Consider the following inputs consis;ng of five families and three deliveries.
Below is a diagram showing the loca;ons of the five families. The coordinates are shown below the
x-axis while family IDs are shown above the x-axis.
For the first delivery 2 3, since family 3 is the only neighbor of family 2, the number of magic beans
consumed is 1.
ENGG1330 Computer Programming I Assignment 1
Page 5 of 7
For the second delivery 2 4, the total number of magic beans consumed is 8 and the breakdown is as
follows.
• From family 2 to family 3, the number of magic beans consumed = 1.
• From family 3 to family 1, the number of magic beans consumed = 1.
• From family 1 to family 5, the number of magic beans consumed = 1.
• From family 5 to family 4, the number of magic beans consumed = 5.
For the third delivery 5 2, the total number of magic beans consumed is 13 and the breakdown is as
follows.
• From family 5 to family 1, the number of magic beans consumed = 1.
• From family 1 to family 3, the number of magic beans consumed = 4.
• From family 3 to family 2, the number of magic beans consumed = 8.
Samples
ENGG1330 Computer Programming I Assignment 1
Page 6 of 7
Problem 4 (35%)
You are a soldier in the baelefield game. The baelefield is a rectangular grid (matrix) M and the
elements in the grid are integers. If the element mij in row i and column j is posi;ve (indices i, j start
from 0), it means there are mij enemies in this place; if mij = 0, it means there is no one in this place;
if mij = -1, it means there are friend troops in this place.
You have a special weapon with power p. You can use it for one 1me at a selected place in a selected
direc;on. The following figures show the damage range for p = 3 in four direc;ons (↑→, ↓→, ←↓,
←↑), respec;vely. For other value of power p, the damage range changes accordingly.
You have to find out the place and the direc;on to use the weapon, such that you can kill the most
enemies while no friend troops get hurt. Every enemy you killed, you get 1 reward. If no enemy is
killed, your reward is 0.
Write a program to read h+1 lines. In the first line, the height h and the width w of the grid, and
power p of the weapon are inpueed. Then, h lines with w number of integers in each line,
represen;ng the baelefield, are inpueed.
If in all places and direc;ons, some friend troops will get hurt, then the program outputs
"Friend troops will get hurt! Do not use weapon at any place!"
Otherwise, the program outputs 3 lines in the following form, even if your reward is 0:
"You can use weapon at row X, column Y."
"The direc;on is D."
"Your reward is R!"
where X and Y are the row number and column number of the place, respec;vely, D is one of the
four direc;ons (↑→, ↓→, ←↓, ←↑) and R is the amount of rewards. If more than one place or
direc;on gives the same maximal reward, the program may output any one of them.
ENGG1330 Computer Programming I Assignment 1
請加QQ:99515681  郵箱:99515681@qq.com   WX:codehelp 

掃一掃在手機打開當前頁
  • 上一篇:BEE1038代做、代寫Python設計程序
  • 下一篇:辦理菲律賓投資移民流程是什么-經驗分享
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 豆包網頁版入口 破天一劍 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    欧美精品卡一卡二| 性欧美精品一区二区三区在线播放 | 91九色丨porny丨国产jk| 不卡一区二区三区四区五区| 日韩视频第一页| 亚洲蜜桃av| 国产一区香蕉久久| 久久精品99久久久香蕉| 亚洲国产日韩综合一区| 国产有码在线一区二区视频| 久久久噜久噜久久综合| 色综合久久88色综合天天提莫| 国产视色精品亚洲一区二区| 日韩在线视频网站| 亚洲www在线| 蜜臀av性久久久久蜜臀av| 久久草.com| 日本精品久久久久中文字幕| 97碰在线观看| 一本一生久久a久久精品综合蜜| 国产精品中文字幕在线| 国产精品成久久久久三级| 欧美与黑人午夜性猛交久久久 | 久久综合久久网| 国产精品久久久久久久久电影网| 激情五月宗合网| 日韩亚洲精品视频| 日本a级片电影一区二区| 久久综合九色综合88i| 曰韩不卡视频| 国产欧美精品一区二区三区| 国产精品国语对白| 国产女主播一区二区| 精品国产_亚洲人成在线| 青青久久av北条麻妃黑人| 97伦理在线四区| 亚洲综合第一页| 成人免费在线网址| 国产精品免费一区| 国产主播在线看| 精品中文字幕乱| 国产欧美一区二区三区久久人妖 | 日本精品久久电影| 国产a级片网站| 任我爽在线视频精品一| 色偷偷av亚洲男人的天堂| 欧美日韩激情视频在线观看| 久久久久久久久影视| 青青草综合在线| 日韩中文在线视频| 国产一区二区三区黄| 最新av网址在线观看| av在线com| 日本一区视频在线| 久久久久久久久久久91| 男人天堂成人在线| 亚洲最大激情中文字幕| 久久综合精品一区| 青青在线免费观看| 精品成在人线av无码免费看| 国产伦精品一区二区三区精品视频 | 国产日韩欧美黄色| 欧美激情在线有限公司| 不卡影院一区二区| 日本在线精品视频| 国产精品美女999| 国产乱人伦精品一区二区| 亚洲区成人777777精品| www.精品av.com| 精品午夜一区二区| 亚欧洲精品在线视频免费观看| 国产a级一级片| 国产一区二区精品免费| 国产精品久久激情| av一区二区三区免费| 欧美怡春院一区二区三区| 永久久久久久| 国产精品嫩草影院久久久| 国产精品69久久| 国产亚洲欧美一区二区| 日韩成人av电影在线| 蜜臀久久99精品久久久久久宅男| 久久久久久久久久久成人| 国产精品揄拍一区二区| 日本精品福利视频| 中文字幕在线乱| 国产精品日本精品| 国产福利成人在线| 国产综合av在线| 青青草国产免费| 伊人久久青草| 国产精品成人品| 久久久久久欧美精品色一二三四| 成人精品网站在线观看| 男人亚洲天堂网| 日韩色妇久久av| 亚洲www在线| 国产99视频精品免费视频36| 国产精品视频一二三四区| 国产精品99免视看9| 国产一区二区三区四区五区加勒比 | 免费无遮挡无码永久视频| 日韩在线综合网| 久久91亚洲精品中文字幕奶水| 久久久精品一区| 久久精品久久精品国产大片| 91精品国产一区二区三区动漫| 国产性生活免费视频| 欧美一区激情视频在线观看| 日本精品在线视频| 亚洲在线www| 国产精品久久久久久av福利| 久久久精品久久久| 国产a级片免费看| 久久久com| 91av视频在线免费观看| 成人精品久久av网站| 国产在线资源一区| 国产中文字幕日韩| 国产主播精品在线| 国精产品99永久一区一区 | 国产福利精品av综合导导航| 久久男人的天堂| 久章草在线视频| 成人免费在线一区二区三区| 国产毛片视频网站| 国产一区深夜福利| 国产日本在线播放| 国产一级特黄a大片99| 国产视频99| 国产视色精品亚洲一区二区| 国产在线精品一区二区三区 | 国产精品网站大全| 国产精品视频一区二区三区四区五区 | 国产a∨精品一区二区三区不卡| 国产精品高清网站| 欧美久久久精品| 色综合视频一区中文字幕| 国产精国产精品| 久久99精品久久久久久秒播放器 | 亚洲欧美国产不卡| 视频在线99| 日本成人黄色| 欧美在线视频免费| 国模精品视频一区二区三区| 国产一区二区三区乱码| 国产亚洲欧美另类一区二区三区 | 国产主播精品在线| 成人免费视频91| 97人人香蕉| 久久久综合香蕉尹人综合网| 久久96国产精品久久99软件| 久久久久久欧美精品色一二三四 | 精品国产乱码久久久久久蜜柚| 亚洲资源视频| 无码aⅴ精品一区二区三区浪潮 | 91精品国产自产在线老师啪| 久久国产午夜精品理论片最新版本| 国产h视频在线播放| 久久精品视频va| 欧美美最猛性xxxxxx| 不卡av日日日| 亚洲一区二区三区sesese| 日韩欧美国产免费| 国产原创精品| 8090成年在线看片午夜| 国产成人精品在线观看| 国产精品久久久久久久av大片| 久久99精品久久久久久琪琪| 亚洲激情免费视频| 欧美在线一级va免费观看| 黄色片网址在线观看| www日韩av| 丝袜美腿亚洲一区二区| 欧美精品在线观看91| 亚洲欧美日韩综合一区| 日韩免费av在线| 国产美女久久久| 7777精品久久久久久| 亚洲高清123| 日本三级久久久| 精品999在线观看| 国产999在线| 日本不卡一区二区三区四区| 韩国三级日本三级少妇99| 国产精品一区而去| 爽爽爽爽爽爽爽成人免费观看| 久久av.com| 日韩高清国产一区在线观看| 国产情侣第一页| 国产成人+综合亚洲+天堂| 日韩视频免费中文字幕| 一区二区三区观看| 内射国产内射夫妻免费频道| 91久久国产婷婷一区二区| 国产av人人夜夜澡人人爽麻豆| 97精品免费视频| 日本一区二区三区在线播放| 久久99久久99精品| 欧美在线免费视频|