99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

ENGG1330代做、Python程序設(shè)計(jì)代寫

時(shí)間:2024-03-21  來(lái)源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



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
請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codehelp 

掃一掃在手機(jī)打開(kāi)當(dāng)前頁(yè)
  • 上一篇:BEE1038代做、代寫Python設(shè)計(jì)程序
  • 下一篇:辦理菲律賓投資移民流程是什么-經(jīng)驗(yàn)分享
  • 無(wú)相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    出評(píng) 開(kāi)團(tuán)工具
    出評(píng) 開(kāi)團(tuán)工具
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
    合肥機(jī)場(chǎng)巴士2號(hào)線
    合肥機(jī)場(chǎng)巴士2號(hào)線
    合肥機(jī)場(chǎng)巴士1號(hào)線
    合肥機(jī)場(chǎng)巴士1號(hào)線
  • 短信驗(yàn)證碼 豆包 幣安下載 AI生圖 目錄網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號(hào)-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                欧美激情在线一区二区| 91性感美女视频| 久久99精品久久只有精品| 日本高清免费不卡视频| 色伊人久久综合中文字幕| 久久综合久久鬼色| 麻豆成人久久精品二区三区小说| 欧美日韩免费电影| 国产日韩高清在线| 国产精品夜夜嗨| 国产婷婷精品av在线| 欧美色图在线观看| 国内欧美视频一区二区| 一区二区国产视频| 精品成人免费观看| 欧美精品三级在线观看| 国产乱国产乱300精品| 亚洲美女免费视频| 国产午夜精品久久久久久免费视 | 亚洲男帅同性gay1069| 在线91免费看| 色嗨嗨av一区二区三区| 另类小说视频一区二区| 国产日产亚洲精品系列| 欧美三级中文字| 国产91精品精华液一区二区三区| 亚洲国产综合91精品麻豆| 国产日韩欧美高清| 欧美一区二区三区视频在线观看| 色综合天天综合狠狠| 粉嫩av一区二区三区在线播放| 天天色 色综合| 亚洲激情在线激情| 亚洲视频资源在线| 最新国产成人在线观看| 欧美国产激情二区三区| 国产亚洲精品精华液| 精品国产一区a| 日韩一区二区视频在线观看| 欧美日韩久久久一区| 日本福利一区二区| 91影视在线播放| 成人国产一区二区三区精品| 高清国产一区二区| 成人丝袜视频网| 成人精品一区二区三区中文字幕| 国产在线国偷精品免费看| 另类欧美日韩国产在线| 性久久久久久久| 无码av免费一区二区三区试看| 亚洲一级二级三级在线免费观看| 国产精品国产三级国产aⅴ入口| 欧美国产精品劲爆| 成人免费在线播放视频| 亚洲日本va在线观看| 中文字幕字幕中文在线中不卡视频| 国产视频不卡一区| 国产精品国产馆在线真实露脸 | 一区二区三区美女| 亚洲香蕉伊在人在线观| 亚洲精品国产精华液| 亚洲自拍偷拍图区| 亚洲综合清纯丝袜自拍| 一区二区三区欧美激情| 国产精品成人一区二区艾草 | 国产精品久久久久国产精品日日 | 国产91丝袜在线播放九色| 久久99精品久久只有精品| 麻豆91免费观看| 丰满白嫩尤物一区二区| 一本一道久久a久久精品 | 一本久久综合亚洲鲁鲁五月天| 色一情一乱一乱一91av| 欧美一个色资源| 国产精品午夜在线| 亚洲一区二区三区四区的| 日本免费新一区视频| 成人午夜私人影院| 7777精品伊人久久久大香线蕉完整版 | 欧美一级淫片007| 久久一区二区三区国产精品| ㊣最新国产の精品bt伙计久久| 亚洲成人免费电影| 久久成人久久鬼色| 91在线精品一区二区三区| 91精品黄色片免费大全| 国产精品美女一区二区三区| 午夜精品爽啪视频| 成人免费毛片片v| 日韩午夜电影av| 亚洲女厕所小便bbb| 国产经典欧美精品| 欧美高清视频一二三区| 亚洲色图一区二区| 韩国成人精品a∨在线观看| 在线观看亚洲一区| 中文字幕精品一区二区三区精品| 亚洲香肠在线观看| 99视频国产精品| 久久精品夜色噜噜亚洲a∨| 午夜av区久久| 在线观看日韩国产| 中文字幕在线不卡国产视频| 国产一区在线观看麻豆| 日韩欧美国产小视频| 婷婷丁香激情综合| 欧美亚洲综合一区| 一区二区三区在线视频观看58| 成人av先锋影音| 国产日本一区二区| 懂色av一区二区在线播放| 精品国产免费一区二区三区四区| 婷婷丁香久久五月婷婷| 欧美日韩日本视频| 亚洲国产成人91porn| 91精品福利视频| 亚洲激情六月丁香| 欧美在线播放高清精品| 樱桃国产成人精品视频| 在线观看日韩国产| 亚洲无人区一区| 欧美日韩综合一区| 日韩中文字幕不卡| 日韩欧美一区二区三区在线| 日本色综合中文字幕| 91精品国产色综合久久久蜜香臀| 亚洲福利视频导航| 日韩一级精品视频在线观看| 麻豆视频观看网址久久| 久久综合色8888| 国产91在线观看丝袜| ...xxx性欧美| 欧美久久一区二区| 国产精品456| 亚洲免费大片在线观看| 欧美精品久久一区| 国产一区福利在线| 一区在线中文字幕| 欧美人伦禁忌dvd放荡欲情| 日本一区中文字幕| 精品国产青草久久久久福利| 国产成人免费视频一区| 最近中文字幕一区二区三区| 欧美伊人久久大香线蕉综合69| 性欧美大战久久久久久久久| 精品国产伦一区二区三区观看体验 | 一区二区三区小说| 91精品国产手机| 成人一级片在线观看| 一区二区三区欧美在线观看| 欧美精品在欧美一区二区少妇| 久国产精品韩国三级视频| 国产亚洲成av人在线观看导航| 97se亚洲国产综合自在线不卡| 亚洲第一会所有码转帖| 久久久精品国产免大香伊| 91国在线观看| 狠狠色丁香婷婷综合| 一区二区在线观看不卡| 久久久亚洲高清| 色婷婷av久久久久久久| 极品少妇xxxx精品少妇偷拍| 亚洲另类色综合网站| 精品1区2区在线观看| 欧美视频在线一区| 成人国产一区二区三区精品| 免费成人在线观看| 一区二区三区在线免费视频 | 亚洲一级在线观看| 国产欧美精品日韩区二区麻豆天美| 色吊一区二区三区| 国产电影精品久久禁18| 蜜桃av噜噜一区二区三区小说| 一区二区三区四区不卡在线 | 99国产精品视频免费观看| 美女免费视频一区| 午夜激情一区二区| 一区二区三区在线看| 国产精品福利av| 国产欧美一区二区三区沐欲| 精品乱人伦小说| 欧美成人一区二区三区片免费 | 欧美一级片在线观看| 日本高清不卡一区| 91丝袜美女网| 99久久精品久久久久久清纯| 国产一区中文字幕| 国产伦精一区二区三区| 美日韩一区二区三区| 奇米一区二区三区| 免费高清在线视频一区·| 奇米影视在线99精品| 麻豆精品久久久| 免费在线成人网| 毛片av中文字幕一区二区| 另类人妖一区二区av| 精品在线观看视频| 国产福利一区在线| 成年人国产精品| 一本久道中文字幕精品亚洲嫩|