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

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

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

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



Assignment 2
INT2067/INT5051 Introduction to Programming and Problem Solving
2024-2025 Semester 2
Due Date: March 16, 2025 (Sunday)
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 Requirement (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 sections.
• 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 [10%] f, g or c: move the fox, goose, or corn, if available, to the opposite 
shore along with the boat.
o [5%] m: move the boat to the opposite shore without any item.
o [5%] q: quite the game.
• [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 data structures 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 contains no spelling mistakes.
7 Submission Requirements
Your Python file should be named as assignment2.py. Submit only the Python file 
assignment2.py through Moodle. Failure to submit the file properly will result in a 
penalty of 5 to 10 marks.
See Moodle for the exact time of the deadline for submission. Late submission is will 
induce penalty.
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. The use of any artificial intelligence (AI) tools is NOT allowed in this assignment. 
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.
You need to put down a declaration for having not used AI tools as comment at the 
beginning of your program file. For example, your declaration may look like this:
# Declaration: this code is my own individual and original work without AI assistant.
If you have used AI tools or consulted the assignment with anyone, you should provide 
an acknowledgment as comment at the beginning of your program file. Give the names 
of all classmates that you have turned to. For example, your acknowledgement may look 
like:
# Acknowledgement: I have asked Thomas, Gordon, and Emily for help.
# Acknowledgement: I have used AI tools (such as ChatGPT, gpt4o via POE, etc.) in 
working on this assignment.
If plagiarism is found, both the copier and originator will get zero mark for the assignment.
Repeat offenders may result in a deduction of the course grade.
10 Sample Input & Output 1
Welcome
You have to 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 items across the river.
11 Sample Input & Output 2
Welcome
You have to 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.
12 Reference
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

掃一掃在手機打開當前頁
  • 上一篇:EEE6207代做、代寫C++程序設計
  • 下一篇:代寫MS6711、代做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怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 wps 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    久久黄色免费看| 国产美女久久精品| 成人免费观看毛片| 欧美亚洲另类在线| 一本二本三本亚洲码| 日韩在线视频免费观看高清中文| 国产欧美日韩亚洲精品| 日韩网址在线观看| 亚洲欧洲日韩综合二区| 国产精品久久久久久亚洲调教| 久久久免费观看视频| 国产麻花豆剧传媒精品mv在线| 日本欧美视频在线观看| 美女久久久久久久| 国产精品视频免费观看| 国产va免费精品高清在线| 国产精品一香蕉国产线看观看| 日本高清久久一区二区三区| 亚洲综合日韩中文字幕v在线| 国产精品无码av无码| 久久99精品久久久久久水蜜桃| 国产一区二区视频在线观看| 日本10禁啪啪无遮挡免费一区二区| 亚洲精品一区二区三区四区五区| 久久亚洲私人国产精品va| 深夜精品寂寞黄网站在线观看| 久久手机在线视频| 91九色丨porny丨国产jk| 国产在线视频一区| 狠狠噜天天噜日日噜| 免费在线观看的毛片| 欧洲美女7788成人免费视频| 亚洲综合五月天| 久久国产精品视频| 国产精品久久久久av| 国产精品久久久久影院日本| 国产精品无码电影在线观看| 日韩视频在线观看免费| 日韩亚洲综合在线| 国产精品无码专区av在线播放| 国产精品我不卡| 精品国产乱码一区二区三区四区| 欧美xxxx综合视频| 欧美激情日韩图片| 亚洲最大av网| 日韩videos| 欧美连裤袜在线视频| 欧美污视频久久久| 黄色一区三区| 国产亚洲欧美另类一区二区三区| 国产日韩中文字幕| 97国产精品视频| 91精品国产高清久久久久久久久| 99在线精品免费视频| 97福利一区二区| 国产福利精品在线| 久久久精品一区二区三区| 国产精品视频在线播放| 精品久久久无码人妻字幂| 欧美精品999| 视频在线精品一区| 欧美牲交a欧美牲交aⅴ免费下载| 欧美午夜性视频| 国产欧美一区二区三区四区| 91久久精品国产| 久久久久久久香蕉| 久久不射热爱视频精品| 亚洲不卡中文字幕无码| 青草视频在线观看视频| 国产素人在线观看| 久久久久久高清| 国产精品久久av| 亚洲狠狠婷婷综合久久久| 欧美亚洲另类视频| 成人免费观看视频在线观看| 久久riav| 一区不卡字幕| 日韩a∨精品日韩在线观看| 精品日产一区2区三区黄免费| caoporn国产精品免费公开| 久久精品国产视频| 亚洲a成v人在线观看| 精品一区二区日本| 久久精品国产99精品国产亚洲性色| 久久这里有精品视频| 日本精品免费| 国产精品永久免费| 国产精品丝袜一区二区三区| 亚洲精蜜桃久在线| 国产资源在线免费观看| 国产福利精品视频| 欧美激情精品在线| 欧美极品jizzhd欧美| 91精品天堂| 久久99久久99精品免观看粉嫩 | 高清无码视频直接看| 久久久久久久9| 亚洲精品中文字幕无码蜜桃| 国产日韩三区| 国产精品久久波多野结衣| 日韩手机在线观看视频| 97免费视频观看| 精品乱码一区| 蜜桃成人在线| 久久精品2019中文字幕| 亚洲国产另类久久久精品极度| 男人舔女人下面高潮视频| 国产高清精品在线观看| 亚洲精品免费一区二区三区| 国产女人18毛片| 欧美xxxx18性欧美| 欧美丰满熟妇xxxxx| 久久久久久久网站| 日本天堂免费a| 久久亚洲免费| 亚洲www在线| 91精品国产综合久久男男| 伊人久久大香线蕉av一区| 国产亚洲情侣一区二区无| 国产精品久久久久77777| 青青草一区二区| 久久久久久香蕉网| 人妻夜夜添夜夜无码av| 久久久久久久久久av| 日韩少妇中文字幕| 久久久久一本一区二区青青蜜月| 三区精品视频| 国产av人人夜夜澡人人爽麻豆| 欧美一区二区高清在线观看| 国产成人精品免费视频| 日韩高清av| 久久久久久久久久久久久久久久久久av | 又大又硬又爽免费视频| 成人久久一区二区三区| 亚洲综合五月天| 91精品一区二区三区四区| 色欲色香天天天综合网www| 国产成人97精品免费看片| 人妻无码久久一区二区三区免费| 少妇精69xxtheporn| 精品日产一区2区三区黄免费 | 久久国产精品影片| 高清欧美性猛交| 无码人妻aⅴ一区二区三区日本| 久久免费一级片| 欧美日本亚洲| 九色精品美女在线| 国产精品333| 日韩免费av一区二区三区| 国产精品视频最多的网站| 国产日产欧美视频| 亚洲高清视频一区二区| 日韩视频第一页| 国产嫩草一区二区三区在线观看| 亚洲日本理论电影| 国产传媒欧美日韩| 黄在线观看网站| 在线免费一区| 久久久免费在线观看| 欧美亚洲成人免费| 欧美日韩国产第一页| 久久国产精品网| 国产偷人视频免费| 日本a在线免费观看| 九九久久久久久久久激情| 国产高清一区二区三区| 国产制服91一区二区三区制服| 亚洲最大av在线| 久久精品99久久久香蕉| 97免费在线视频| 欧美日韩电影一区二区| 影音先锋欧美在线| www日韩欧美| 97久久精品视频| 国内精品久久久久久影视8| 亚洲成色www久久网站| 另类专区欧美制服同性| 久久久久中文字幕2018| 9a蜜桃久久久久久免费| 欧美精品久久久久久久久久久| 一区二区三区我不卡| 国产精品视频网址| 久久频这里精品99香蕉| 国产免费xxx| 欧美日韩精品综合| 午夜久久资源| 色综合天天狠天天透天天伊人| 久久精品青青大伊人av| 国产成人激情小视频| 99国产在线视频| 国产欧美日韩网站| 男人天堂a在线| 欧美在线www| 日韩av一区二区三区在线| 亚洲中文字幕无码一区二区三区| 日日橹狠狠爱欧美超碰| 亚洲免费视频播放| 日本午夜一区二区三区| 日韩精品无码一区二区三区免费 | www国产亚洲精品|