国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女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在线免费观看
    国产精品视频1区| 白白操在线视频| 久色乳综合思思在线视频 | 精品国产欧美一区二区五十路 | 国产亚洲精品网站| 欧美中文娱乐网| 天堂v在线视频| 日韩av电影在线观看| 色欲色香天天天综合网www| 亚州av一区二区| 日本高清不卡一区二区三| 日韩中文字幕一区| 日韩欧美精品一区二区三区经典| 亚洲一区国产精品| 午夜精品www| 日韩av不卡在线| 韩日午夜在线资源一区二区| 高清一区二区三区日本久 | 国产欧亚日韩视频| 国产精品一区在线免费观看| 91免费在线观看网站| 国产精品av一区| 日韩日本欧美亚洲| 色综合久久久久久中文网| 五月天婷亚洲天综合网鲁鲁鲁| 日本精品福利视频| 欧美牲交a欧美牲交aⅴ免费真| 国产日韩欧美综合| 久久99精品久久久久久秒播放器| 欧美成人四级hd版| 性色av一区二区三区| 黄色a级在线观看| 99免费在线视频观看| 国产精品美女久久久久久免费| 中文字幕一区综合| 欧美性猛交久久久乱大交小说| 国产亚洲情侣一区二区无| 久久久久免费网| 亚洲在线视频福利| 国内精品久久久久久久久| 久久久中文字幕| 免费av在线一区| 黄色www在线观看| 久久久久久久午夜| 日本一区二区三区免费看| 97久久精品国产| 中文字幕一区二区三区精彩视频| 免费久久99精品国产自| 国产成人精品网站| 欧美精品成人网| 国产精品少妇在线视频| 欧美日韩国产高清视频| 久久久中精品2020中文| 亚洲欧洲三级| 91精品久久香蕉国产线看观看| 欧美精品xxx| 国产在线视频在线| 国产精品国产三级国产aⅴ浪潮| 日本精品视频在线播放| 久久久一二三四| 手机在线观看国产精品| 91精品久久香蕉国产线看观看| 日韩av电影中文字幕| 久久99蜜桃综合影院免费观看| 日韩网址在线观看| 国产精品视频一| 成人在线一区二区| 国产综合色香蕉精品| 亚洲欧洲日韩精品| 久久综合婷婷综合| 欧美一级黑人aaaaaaa做受| 久久99欧美| 麻豆精品传媒视频| 亚洲最大福利网站| 久久久久久香蕉网| 国产一区二区片| 亚洲精品一卡二卡三卡四卡 | 日韩中文有码在线视频| 日韩精彩视频| 在线视频一区观看| 色噜噜久久综合伊人一本| 国产在线精品一区二区三区》| 欧美激情一区二区三区久久久| 久久五月天婷婷| 国模吧一区二区| 日本91av在线播放| 一区二区三区四区在线视频| 久久精品五月婷婷| 国产欧美精品日韩精品| 欧美久久久久久| 日韩综合视频在线观看| 国产精品美女xx| 久久久久久久久久国产| 99久re热视频精品98| 欧美精品一区二区三区在线看午夜| 一区二区三区视频在线播放| 日韩在线视频观看正片免费网站| 国产精品一区二区三区免费视频| 性色av一区二区三区在线观看| 久99久在线视频| 国产成人拍精品视频午夜网站| 久无码久无码av无码| 国产伦精品一区二区三区视频孕妇| 欧美亚洲国产视频| 日韩精品一区二区三区色欲av| 一区二区三区电影| 一区二区三区在线视频111| 精品国产一区二区三区四区精华| 国产精品免费观看高清| 国产精品秘入口18禁麻豆免会员| 久久久久久久久久伊人| 九九九九久久久久| 久久久久久久999精品视频| 99三级在线| 国产欧美一区二区三区久久| 国产在线999| 国产精品揄拍500视频| 国产美女三级视频| 99精品在线直播| 国产高清av在线播放| 久久精品国产免费观看| 国产成人aa精品一区在线播放| 久久久久久成人精品| 日韩亚洲精品电影| 国产精品私拍pans大尺度在线| 久久国产精品99国产精| 亚洲日本精品一区| 欧美有码在线视频| 欧美 日韩 国产 在线观看| 国产日韩亚洲欧美| 国产成人极品视频| 国产精品国语对白| 无码人妻丰满熟妇区96| 欧美高清一区二区| 国产欧美久久久久久| 日韩中文字幕在线视频| 国产精品日韩一区二区| 欧美激情一级精品国产| 色播亚洲婷婷| 国产精品亚洲精品| 国产精品视频在线免费观看| 欧美精品激情在线| 欧美日韩国产精品一卡| 国产一级片黄色| 久久精品91久久香蕉加勒比| 国产av第一区| 欧美做受777cos| 99久久自偷自偷国产精品不卡| 日韩在线视频中文字幕| 亚洲人成无码www久久久| 欧美亚洲另类制服自拍| 欧美婷婷久久| 久久网站免费视频| 在线观看国产一区| 国内精品国产三级国产在线专| 国产极品jizzhd欧美| 欧美精品九九久久| 国产嫩草一区二区三区在线观看| 久久人人爽人人爽人人片av高清| 国产精品成人国产乱一区| 欧美一区亚洲二区| 深夜福利国产精品| 日本一区二区三区www| 国产经品一区二区| 亚洲午夜精品福利| 成人精品久久一区二区三区| 精品高清视频| 国产麻豆电影在线观看| 欧美激情一二三| 97欧洲一区二区精品免费| 欧美大胆在线视频| 国产精品一区久久| 亚洲一区二区三区色| 蜜桃久久精品乱码一区二区| 国产精品美女无圣光视频| 欧美专区在线观看| 国产精品情侣自拍| 国产综合久久久久| 久久伊人精品一区二区三区| 国产欧美日韩丝袜精品一区| 精品久久久久久一区| 国产精品一区二区三区在线播放| 亚洲国产激情一区二区三区| 久久久综合香蕉尹人综合网| 日韩精品久久一区| 国产精品视频资源| 国产特级淫片高清视频| 亚洲蜜桃av| 久久久久久久色| 国产在线拍揄自揄视频不卡99| 在线丝袜欧美日韩制服| 久草青青在线观看| 国产又粗又猛又爽又黄的网站| 一区二区三区观看| 九九九九免费视频| 国产精品一区电影| 欧美在线激情网| 懂色一区二区三区av片| 久久精品国产v日韩v亚洲| 成人黄色一区二区|