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

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

代做INT2067、Python編程設計代寫
代做INT2067、Python編程設計代寫

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



Assignment 1 
INT2067 Introduction to Programming and Problem Solving 
2024-2025 Semester 1 
Due Date: October 30, 2024 (Wednesday) 
1 Introduction 
In this assignment, you need to implement a text-based game based on the riddle about 
a farmer who needs to cross a river with a fox, a goose, and a sack of corn. 
2 Riddle 
A farmer with a fox, a goose, and a sack of corn needs to cross a river. The farmer has a 
rowboat, but there is room for only the farmer and one of her three items. 
Unfortunately, both the fox and the goose are hungry. The fox cannot be left alone with 
the goose, or the fox will eat the goose. Likewise, the goose cannot be left alone with 
the sack of corn, or the goose will eat the corn. How does the farmer get everything 
across the river? 
3 Game 
In your text-based game, the farmer can move at most one item to the other shore each 
time. You should ask the user to enter a command to determine what item the farmer 
wants to take at each turn. The game ends when the user quits the game or when the 
user has succeeded or failed. 
4 Basic Design 
You may follow the following basic flow in your program: 
 Show item locations. 
 Repeat: 
1. Ask for the next command. 
2. Update item locations if necessary. 
3. Show item locations. 
4. Exit the loop if the game has succeeded or failed. 
You may need to add other steps and/or flows to fulfill all the requirements. 
5 Requirements (70%) 
Your program should do the following: 
 [5%] Print the goal of the game at the start. 
 [10%] Ask the user to enter a command at each turn and continue until the user 
requests to quit or the goal has succeeded or failed. 
 [10%] Show the location of the boat and the three items (fox, goose, corn) clearly 
at the start of the game and after each turn. You may follow the output in the 
sample session. 
 Accept the following five one-character strings as valid commands: f, g, c, m or 
q. After receiving a valid command, the game should: 
o f, g or c: move the fox, goose, or corn, if available, to the opposite shore 
along with the boat. [10%] 
o m: move the boat to the opposite shore without any item. [5%] 
o q: quit the game. [5%] 
 [10%] Check whether the requested item is on the same shore as the boat when 
the game receives the command f, g or c. If not, it should prompt an error and 
allow the user to enter a command again. 
 [10%] Check whether the game has succeeded or failed after each turn. The 
game has succeeded if all items have been moved to the far shore. The game 
has failed if the fox has eaten the goose, or the goose has eaten the corn. When 
the game has succeeded, it should congratulate the user. When the game has 
failed, it should tell the user why. 
 [5%] Show an error if the user has entered an unrecognized command character 
(i.e. a string other than ‘f’, ‘g’, ‘c’, ‘m’ or ‘q’). 
6 Program Design and User Interface (30%) 
 [10%] You should break down your program into functions with reasonable 
length. 
 [10%] You should use functions and/or lists to reduce redundancy. 
 [10%] The output should be neat, and the required information should be shown 
clearly. The text in the output should be correct and contain no spelling 
mistakes. 
7 Submission Requirements 
 Your Python file should be named as assignment1.py. Submit only the Python 
file assignment1.py through Moodle. Failure to submit the file properly will 
result in a penalty of 5 to 20 marks. 
 See Moodle for the exact time of the deadline for submission. Late submission is 
usually not accepted. You should submit earlier to avoid possibly high tra  ic 
around the deadline. 
8 Hints 
Please check the discussions forum on Moodle regularly for any hints. 
9 Plagiarism Policy 
The assignment should be done only by yourself. Every line of code should be written by 
you. Discussions on the assignment should be kept at a high-level only. You are 
suggested to refer your classmates to the relevant notes or lab exercises if you want to 
help them. 
If cheating is found, both the copier and originator will get zero mark for the 
assignment. 
Repeat o  enders may result in a deduction of the course grade. 
If you have discussed the assignment with anyone, you should provide an 
acknowledgment at the end of your program file. Give the names of all classmates that 
you have discussed with. For example, your acknowledgement may look like this at the 
end of your program file: 
# Acknowledgement: I have discussed it with Thomas, Gordon, and Emily. 
10 Sample Session 1 
Welcome. 
You must bring the fox, the goose, and the corn across the 
river. 
------------------------ 
Boat 
------------------------ 
Fox Goose Corn 
You are now at the near shore, what do you want to take? g 
 Goose 
------------------------ 
Boat 
------------------------ 
Fox Corn 
You are now at the far shore, what do you want to take? m 
 Goose 
------------------------ 
Boat 
------------------------ 
Fox Corn 
You are now at the near shore, what do you want to take? f 
Fox Goose 
------------------------ 
Boat 
------------------------ 
 Corn 
You are now at the far shore, what do you want to take? g 
Fox 
------------------------ 
Boat 
------------------------ 
 Goose Corn 
You are now at the near shore, what do you want to take? c 
Fox Corn 
------------------------ 
Boat 
------------------------ 
 Goose 
You are now at the far shore, what do you want to take? m 
Fox Corn 
------------------------ 
Boat 
------------------------ 
 Goose 
You are now at the near shore, what do you want to take? g 
Fox Goose Corn 
------------------------ 
Boat 
------------------------ 
Congratulations! 
You have brought all the items across the river. 
11 Sample Session 2 
Welcome. 
You must bring the fox, the goose, and the corn across the 
river. 
------------------------ 
Boat 
------------------------ 
Fox Goose Corn 
You are now at the near shore, what do you want to take? 
goose 
You have entered an invalid command. 
------------------------ 
Boat 
------------------------ 
Fox Goose Corn 
You are now at the near shore, what do you want to take? f 
Fox 
------------------------ 
Boat 
------------------------ 
 Goose Corn 
You have failed. 
The goose has eaten the corn. 
References 
V. Anton Sprual. Think Like a Programmer: An Introduction to Creative Problem Solving. 
No Starch Press, San Francisco, 2012. 

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





 

掃一掃在手機打開當前頁
  • 上一篇:代寫Neural Networks for Image 編程
  • 下一篇:SCC.369代做、代寫C/C++編程設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業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在线免费观看
    国产欧美精品在线| 欧美极品一区二区| 亚洲xxxx视频| 欧美性视频在线| 91麻豆天美传媒在线| 久久深夜福利免费观看| 亚洲一区美女| 国产一区红桃视频| 国产v亚洲v天堂无码久久久| 久久亚洲精品一区| 日韩精品最新在线观看| 97精品久久久| 久久精品国产久精国产思思| 午夜精品在线观看| 国产一区二区视频免费在线观看| 91久久精品久久国产性色也91| 国产精品美女在线播放| 日本网站免费在线观看| 不卡视频一区二区三区| 国产精品福利久久久| 日本丰满少妇黄大片在线观看| 成年丰满熟妇午夜免费视频| 国产精品电影网| 人人干视频在线| 久久日韩精品| 日本一区二区三区视频在线观看 | 午夜精品久久久久久久白皮肤 | 国内精品在线一区| 操日韩av在线电影| 国产美女主播在线| 亚洲精品日韩在线观看| 国产精品99蜜臀久久不卡二区| 亚洲7777| 久久国产精品免费观看| 日本a在线免费观看| 俺也去精品视频在线观看| 欧美亚洲国产精品| 国产精品乱子乱xxxx| 国产天堂视频在线观看| 亚洲一二三区精品| 久久人人爽人人爽人人片av高请| 日韩精品久久久免费观看| 久久视频这里只有精品| 免费国产一区二区| 一本久道高清无码视频| 久久艹中文字幕| 精品婷婷色一区二区三区蜜桃| 欧美人交a欧美精品| 久久全国免费视频| 欧美亚洲国产成人精品| 精品国产二区在线| 777精品久无码人妻蜜桃| 青青a在线精品免费观看| 久久成人亚洲精品| 国产精品99久久久久久www| 欧美在线一区二区视频| 欧美日韩国产成人| 国产a一区二区| 欧在线一二三四区| 中文字幕综合在线观看| 久久99精品久久久久久青青日本| 蜜桃成人在线| 痴汉一区二区三区| 精品蜜桃一区二区三区 | 欧美日韩国产精品一区二区| 九九九热精品免费视频观看网站| 2019日本中文字幕| 国内精品中文字幕| 午夜老司机精品| 国产精品久久久久99| 久久综合亚洲精品| 国产综合免费视频| 日本久久久a级免费| 欧美美最猛性xxxxxx| 国产成人一区二区三区电影 | 又粗又黑又大的吊av| www国产亚洲精品久久网站| 国产精选一区二区| 欧美与黑人午夜性猛交久久久 | 日本高清不卡三区| 宅男在线精品国产免费观看| 日韩在线资源网| 91久久精品视频| 国产日韩亚洲欧美在线| 日本一区二区三区视频在线观看 | 日韩一区二区福利| 97人人澡人人爽| 国产中文字幕乱人伦在线观看| 日本aa在线观看| 亚洲国产精品影视| 中文字幕久久综合| 久久深夜福利免费观看| 久久久com| 91精品在线看| 国产乱码精品一区二区三区不卡 | xvideos亚洲| 久久这里只有精品18| 国产精品香蕉av| 国产综合18久久久久久| 欧美性大战久久久久xxx| 综合久久国产| 久久久久久高潮国产精品视| 国产精品吊钟奶在线| 久久久久久久久四区三区| 91精品一区二区三区四区| 国产日韩一区欧美| 国内自拍欧美激情| 欧美日韩亚洲一区二区三区在线观看| 日韩av在线一区二区三区| 亚洲午夜激情| 亚洲自拍av在线| 一区二区三区观看| 中文字幕人妻熟女人妻洋洋| 不卡伊人av在线播放| 国产精品久久国产精品| 久久精品国产清自在天天线| 色婷婷av一区二区三区在线观看| 国产黄色激情视频| 91久久久一线二线三线品牌| 成人免费aaa| 古典武侠综合av第一页| 国产美女作爱全过程免费视频| 国产日韩欧美在线观看| 国产欧美日韩网站| 国产美女高潮久久白浆| 国产欧美日韩免费| 超碰97国产在线| 91九色蝌蚪国产| 久久涩涩网站| 日韩在线视频免费观看| www亚洲欧美| 国产精品久久二区| 久热精品视频在线观看| 精品国产乱码久久久久久蜜柚| 精品伦精品一区二区三区视频| 国产精品成人一区二区三区| 色综合导航网站| 亚洲人成网站在线观看播放| 亚洲www视频| 日韩毛片在线免费看| 欧美 日韩精品| 国产一区在线免费观看| 成人国产一区二区| 久久另类ts人妖一区二区| 久久久久久久久久网| 国产精品爽爽ⅴa在线观看| 国产精品果冻传媒潘| 真实国产乱子伦对白视频| 亚洲欧美国产精品桃花| 欧美一区二区三区四区夜夜大片| 日韩videos| 男人添女人下部高潮视频在观看| 国产日韩欧美黄色| 国产经典一区二区| 久久精品亚洲一区| 久久99热精品这里久久精品| 亚洲精品中文字幕在线| 日韩久久久久久久| 国产日本欧美一区二区三区| 91精品国产自产在线观看永久| 久久精品美女| 国产精品久久久久久久久久东京 | 日韩中文字幕三区| 韩国三级日本三级少妇99| 国产情人节一区| 久久偷看各类wc女厕嘘嘘偷窃| 久久久成人的性感天堂| 中文字幕乱码人妻综合二区三区| 日韩中文在线字幕| 国内自拍中文字幕| 97精品久久久| 国产精品美女久久久久av福利 | 国产成人久久婷婷精品流白浆| 欧美精品xxx| 日韩理论片在线观看| 国产区日韩欧美| 国产ts一区二区| 久久成人在线视频| 日本视频久久久| 国产伦精品一区二区三区视频孕妇| 国产精品999999| 久久av资源网站| 热久久美女精品天天吊色| 国产亚洲欧美一区二区| 国产成人精品久久二区二区| 国产精品精品软件视频| 天堂一区二区三区| 国产啪精品视频网站| 日韩一区二区av| 亚洲乱码国产一区三区| 国产中文字幕视频在线观看| 日韩在线免费视频| 亚洲国产一区二区在线| 国产啪精品视频| 国产精品视频区| 日本欧美中文字幕| 成人免费毛片网| 国产精品电影在线观看| 秋霞成人午夜鲁丝一区二区三区| 分分操这里只有精品|