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

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

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設計程序
  • 下一篇:辦理菲律賓投資移民流程是什么-經驗分享
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相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>
        精品88久久久久88久久久| 欧美日韩一区二区在线观看| 国产精品毛片a∨一区二区三区| 美女爽到呻吟久久久久| 国产精品久久久久9999吃药| 国产色综合天天综合网| 亚洲女优在线| 国模精品娜娜一二三区| 亚洲在线视频观看| 国产三级欧美三级日产三级99| 久久久噜噜噜久久中文字幕色伊伊| 欧美日韩在线亚洲一区蜜芽| aa级大片欧美| 99天天综合性| 中日韩美女免费视频网站在线观看| 在线日韩av永久免费观看| 欧美日韩免费观看一区二区三区| 亚洲一区二区三区精品在线| 欧美日韩三级视频| 亚洲自啪免费| 欧美劲爆第一页| 乱人伦精品视频在线观看| 国产精品五月天| 亚洲激情一区二区| 在线免费观看欧美| 免费亚洲电影在线观看| 久久夜色精品国产欧美乱极品| 久久一区精品| 欧美日韩成人一区二区| 国产精品露脸自拍| 国产一区二区三区网站| 亚洲欧美第一页| 亚洲精品视频二区| 中文国产成人精品久久一| 一道本一区二区| 午夜精品视频在线观看| 日韩亚洲视频| 欧美国产欧美亚洲国产日韩mv天天看完整| 国产精品草莓在线免费观看| 亚洲视频电影图片偷拍一区| 激情欧美一区二区三区在线观看| 欧美日韩精品在线播放| 黑人中文字幕一区二区三区| 国产精品高潮呻吟久久av无限| 免费欧美高清视频| 欧美中文字幕在线视频| 欧美日韩一卡二卡| 国模精品娜娜一二三区| 亚洲综合电影一区二区三区| 国产欧美一区二区三区久久人妖| 欧美三级午夜理伦三级中视频| 国产人妖伪娘一区91| 影音先锋亚洲精品| 亚洲欧美99| 亚洲在线成人精品| 亚洲综合色在线| 亚洲制服少妇| 国产亚洲日本欧美韩国| 玖玖玖免费嫩草在线影院一区| 久久婷婷一区| 国产精品v欧美精品v日韩| 亚洲精品欧美极品| 免费日韩av片| 亚洲免费在线播放| 亚洲高清视频的网址| 久久成人精品一区二区三区| 国产精品视频免费在线观看| 精品va天堂亚洲国产| 久久久夜色精品亚洲| 久久亚洲电影| 亚洲午夜成aⅴ人片| 久久久午夜电影| 久久久久国产精品午夜一区| 久久精品国产综合| 欧美精品九九99久久| 精品999在线播放| 午夜精品av| 欧美高清视频在线播放| 欧美aⅴ一区二区三区视频| 在线日韩中文| 国产色产综合色产在线视频| 国产精品一区二区三区久久| 农夫在线精品视频免费观看| 久久久精品五月天| 久久蜜桃资源一区二区老牛| 国产一区二区三区观看| 久久久久久亚洲精品不卡4k岛国| 中国亚洲黄色| 国产综合18久久久久久| 亚洲欧美在线播放| 国产日韩欧美一二三区| 欧美电影专区| 另类春色校园亚洲| 亚洲免费伊人电影在线观看av| 一区二区黄色| 久久婷婷国产综合精品青草| 在线成人免费观看| 香蕉亚洲视频| 精品成人a区在线观看| 在线视频欧美日韩精品| 狠狠爱www人成狠狠爱综合网| 久久裸体艺术| 午夜精品国产更新| 制服丝袜激情欧洲亚洲| 亚洲剧情一区二区| 亚洲欧美激情在线视频| 欧美一区激情| 亚洲一区二区三区成人在线视频精品| 欧美日韩一区二区三区免费看| 国产欧美成人| 久久亚洲精品中文字幕冲田杏梨| 久久国产精品免费一区| 亚洲国产精品ⅴa在线观看| 国产精品第一区| 欧美精品久久一区| 91久久精品一区二区三区| 亚洲精品乱码久久久久久| 亚洲永久免费观看| 欧美乱妇高清无乱码| 99精品欧美一区二区三区| 欧美日韩国产成人在线免费| 欧美精品日韩一本| 国产视频一区在线观看一区免费| 欧美一区二区三区四区视频| 欧美岛国在线观看| 牛人盗摄一区二区三区视频| 玖玖玖国产精品| 宅男噜噜噜66国产日韩在线观看| 99精品欧美| 国产日韩在线看| 欧美日韩色一区| 久久av一区二区三区漫画| 欧美电影专区| 国内精品久久久久久久影视麻豆| 国产热re99久久6国产精品| 欧美日韩中文字幕在线视频| 欧美精品一区二区三区很污很色的| 久久久精品日韩| 亚洲国产清纯| 亚洲第一页中文字幕| 性欧美1819性猛交| 国产视频精品网| 国产午夜精品麻豆| 亚洲无玛一区| 亚洲男人第一av网站| 国产精品美女久久久久久2018| 国产日韩欧美在线看| 亚洲免费伊人电影在线观看av| 欧美三区在线视频| 亚洲一级特黄| 久久精精品视频| 亚洲国产精品精华液网站| 欧美性做爰毛片| 国产精品久久久久一区二区| 欧美激情中文字幕乱码免费| 欧美午夜精品理论片a级按摩| 99re6这里只有精品视频在线观看| 91久久在线| 一区二区日韩欧美| 韩国精品在线观看| 欧美日韩国产大片| 乱中年女人伦av一区二区| 亚洲宅男天堂在线观看无病毒| 欧美综合第一页|