国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女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怎么修改定
  • 短信驗證碼 豆包網頁版入口 破天一劍 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    国产精品久久久久久久久久久久冷| 91精品国产一区| 成人动漫在线视频| 欧美成年人视频| 日韩中文不卡| 国产精品一区二区免费| 国产精品国模大尺度私拍| 欧美在线视频一二三| 久久免费福利视频| 亚洲第一精品区| 成人久久久久爱| 欧美激情视频在线| 国产日韩中文在线| 欧美成人精品在线| 国产日韩欧美亚洲一区| 国产精品久久久久久久av电影 | 久99久在线视频| 欧美一区少妇| 久久精品国产清自在天天线| 欧美一级黑人aaaaaaa做受| 色天天综合狠狠色| 国产99久久精品一区二区永久免费| 蜜桃视频一区二区在线观看| 国产精品高清在线| 国产欧美日韩一区| 久久久久国产一区二区三区| 国产精品一区二区三区精品| 一区二区日本伦理| www国产精品内射老熟女| 亚洲一区二区久久久久久| 99久久精品免费看国产四区| 亚洲高清视频一区| 女女同性女同一区二区三区91 | 精品国产一区二区三区久久久 | 国内精品久久久久久| 久久综合88中文色鬼| 国产欧美高清在线| 中文字幕一区二区三区在线乱码 | 中文字幕一区二区三区有限公司 | 97欧美精品一区二区三区| 亚洲 日韩 国产第一区| 久久人人爽人人爽人人av| 日本精品www| 久久精品国产69国产精品亚洲| 黄色国产一级视频| 国产aaa免费视频| 不卡影院一区二区| 日本不卡视频在线播放| 国产精品免费久久久| 国精产品一区一区三区有限在线| 久久久久久18| 久久国产精品精品国产色婷婷| 国内一区在线| 亚洲一区二区三区四区中文| 久久成人免费观看| 激情小视频网站| 一本久久a久久精品vr综合| 国产高清自拍一区| 黄色高清无遮挡| 亚洲一区三区电影在线观看| 久久国产乱子伦免费精品| 男人亚洲天堂网| 亚洲午夜精品一区二区| 色噜噜狠狠色综合网图区| 国产伦一区二区三区色一情| 日本精品视频在线观看| 米奇精品一区二区三区在线观看| 91超碰中文字幕久久精品| 精品日本一区二区三区| 亚洲一区中文字幕在线观看| 久久久av网站| 99久久免费观看| 精品嫩模一区二区三区| 亚洲国产精品一区二区第四页av| 久久国产乱子伦免费精品| 国产免费一区二区视频| 天堂√在线观看一区二区| 国产精品久久久久久一区二区| 91九色国产社区在线观看| 欧美在线视频免费| 综合一区中文字幕| 国产精品免费一区二区三区 | 精品国产欧美一区二区五十路 | 懂色av粉嫩av蜜臀av| 麻豆一区二区在线观看| 久草综合在线观看| 国产伦精品一区二区三区高清| 午夜精品一区二区三区在线视频| 久久艳片www.17c.com| 久久久久亚洲精品国产| 国产精品一区二区三区成人| 激情网站五月天| 日本中文字幕亚洲| 亚洲在线观看视频| 国产精品久久久久久久7电影| 久久免费视频网| 成人中文字幕在线播放| 精品无码一区二区三区爱欲| 欧美一级片在线播放| 在线观看一区二区三区三州| 国产精品露脸自拍| 国产chinese精品一区二区| 99色精品视频| 国产乱子伦精品| 精品一区二区三区毛片| 免费国产一区| 精品欧美一区免费观看α√| 日韩精品一区二区三区外面| 天天爽天天狠久久久| 一区二区三区四区五区视频| 久久亚洲私人国产精品va| 国产精品免费在线免费| 久久九九精品99国产精品| 91精品国产自产在线观看永久| 国产精品一区久久| 国产欧美精品va在线观看| 国产日韩一区二区三区| 国产一区高清视频| 国产一区高清视频| 国产在线精品91| 国产在线精品播放| 国产熟人av一二三区| 国产日韩欧美一区二区| 国产日韩欧美综合| 国产成人综合久久| 久久亚洲免费| 国产不卡av在线免费观看| 国产二级片在线观看| 91国偷自产一区二区三区的观看方式| 高清av免费一区中文字幕| 国产欧美精品一区二区| 国产麻花豆剧传媒精品mv在线| 国产三级中文字幕| 丰满人妻中伦妇伦精品app| 国产欧美精品久久久| 国产在线播放一区二区| 国产又黄又爽免费视频| 国产精品最新在线观看| 成人久久精品视频| 91国自产精品中文字幕亚洲| 91精品国产91久久久久久久久| 97精品久久久| 久久亚洲一区二区| 久久久久久久久四区三区| 久久久久久久久久久福利| 久久精品国产99精品国产亚洲性色 | 国产精品福利在线观看| 欧美精品一本久久男人的天堂| 美女999久久久精品视频| 中文字幕日韩一区二区三区| 亚洲精品永久www嫩草| 精品视频一区二区三区四区| 国产裸体写真av一区二区| 91精品国产91久久久久久不卡| 国产xxxx振车| 久久亚洲精品网站| 性高潮久久久久久久久| 欧美精品久久久久久久自慰| 国产欧美日韩免费看aⅴ视频| 国产精品91久久| 国产精品三区www17con| 在线视频一二三区| 青青草综合在线| 国产美女主播在线| 91久色国产| 国产精品丝袜高跟| 色综合久久天天综线观看| 亚洲欧美日韩另类精品一区二区三区| 日本欧美精品久久久| 国语自产精品视频在线看| 91久久久久久久久久久| 久久久av一区| 亚洲成人第一| 免费看国产精品一二区视频| 成人国产精品一区二区 | 中文字幕剧情在线观看一区| 日本香蕉视频在线观看| 男人的天堂成人| julia一区二区中文久久94| 久久久精品亚洲| 久久艳片www.17c.com| 亚欧洲精品在线视频免费观看| 秋霞无码一区二区| 成人黄色一区二区| 精品国内亚洲在观看18黄| 中文字幕一区二区中文字幕| 欧美日韩一区二区三区在线观看免 | 中文字幕av导航| 黄色小网站91| 99久re热视频精品98| 久久精品国产2020观看福利| 国产精品美乳在线观看| 欧美日韩成人黄色| 欧美日本韩国在线| 99免费在线观看视频| 国产精品免费观看高清| 污视频在线免费观看一区二区三区| 男女超爽视频免费播放| 91精品久久久久久久久久另类| 亚洲va久久久噜噜噜|