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

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

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

時間:2025-03-07  來源:合肥網(wǎng)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語言程序
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業(yè)
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養(yǎng) 十大衛(wèi)浴品牌排行 suno 豆包網(wǎng)頁版入口 wps 目錄網(wǎng) 排行網(wǎng)

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    国产综合第一页| 亚洲三区视频| 国产美女久久精品| 国产精品自拍偷拍视频| 成人中文字幕在线播放| 成人在线观看毛片| 国产精品一区二区三| 国产又粗又爽又黄的视频| 国产欧美日韩视频| 国产精品亚洲精品| 91久久久久久久久久久久久| 国产精品自拍首页| 国产精品自拍偷拍| 91精品国产高清自在线| 久热免费在线观看| 日韩在线观看网址| 国产精品人成电影在线观看| 国产精品夫妻激情| 中文字幕一区综合| 欧美一级片久久久久久久| 日韩精品视频久久| 国产亚洲综合视频| 91久久国产精品91久久性色 | 亚洲精品乱码久久久久久蜜桃91 | 亚洲一区免费看| 亚洲一区二区在| 日本免费高清不卡| 免费高清一区二区三区| 国产精品一区二区欧美| 国产高清视频一区三区| 国产精品男女猛烈高潮激情| 欧美激情一区二区三区久久久| 亚洲一区二区三区四区在线播放 | 国模视频一区二区三区| 91久久久久久久久久久久久| 久久影院理伦片| 精品久久久91| 亚洲欧洲精品一区二区| 欧美亚洲精品一区二区| 国产精品香蕉在线观看| 国产成人高清激情视频在线观看| 国产精品久久精品视| 亚洲国产精品123| 极品尤物一区二区三区| 91免费人成网站在线观看18| 国产精品视频免费一区| 亚洲a在线观看| 国产日韩欧美在线| 日韩在线欧美在线国产在线| 一区二区三区四区欧美日韩| 日韩女优人人人人射在线视频| 国产一区在线观| 久久riav| 亚洲第一精品区| 国产亚洲精品自在久久| 色妞欧美日韩在线| 亚洲一区二区在线| 国产日韩欧美视频| 国产成人拍精品视频午夜网站| 一本色道久久88亚洲精品综合 | 91极品视频在线| 精品不卡一区二区三区| 日本久久亚洲电影| av日韩一区二区三区| 不卡毛片在线看| 欧美日韩激情四射| 久久久久久久久爱| 欧美一区二区三区图| 99热亚洲精品| 亚洲综合最新在线| 国产一级片黄色| 国产精品无码专区在线观看| 天堂√在线观看一区二区| 产国精品偷在线| 欧美精品999| 国产天堂视频在线观看| 国产精品久久久久久久乖乖| 奇米精品一区二区三区| 国产高清www| 日日摸天天爽天天爽视频| 97碰在线观看| 亚洲综合第一页| 成人av在线不卡| 久久av在线看| 久久中国妇女中文字幕| 青青草精品毛片| 久久久久久一区| 日av中文字幕| 日韩专区在线播放| 青青草原一区二区| 国产成人精品一区二区三区福利| 秋霞午夜一区二区| 色偷偷888欧美精品久久久| 欧美一级电影久久| 国产精品视频专区| 国产一区视频在线| 中文视频一区视频二区视频三区| 欧美一级黄色影院| 日韩中文字幕在线看| 黄色免费观看视频网站| 国产精品久久波多野结衣| 国产一级不卡视频| 一本久道中文无码字幕av| 国产经典久久久| 日本不卡久久| 国产精品热视频| 成人在线小视频| 欧美一区二区三区精美影视| 久久久久久久一| 国产一区二区视频播放| 亚洲精品久久久久久一区二区 | 久久久久免费网| 欧美视频第三页| 国产精品福利网| 97欧洲一区二区精品免费| 日本精品视频在线播放| 国产精品免费一区二区三区| 国产无限制自拍| 亚洲精品不卡| 国产精品免费视频xxxx| 成人免费毛片播放| 日本国产一区二区三区| 国产精品久久久久久婷婷天堂| 成人免费毛片播放| 欧美在线视频一区二区| 在线视频欧美一区| 久久久久一区二区| 国产三区二区一区久久| 视频一区视频二区视频三区视频四区国产| 久久天天躁狠狠躁夜夜躁| 白白操在线视频| 欧美亚洲成人网| 亚洲一区二区三区乱码| 久久九九精品99国产精品| 99久久国产宗和精品1上映| 免费在线一区二区| 天堂v在线视频| 久久99青青精品免费观看| www.日韩视频| 77777亚洲午夜久久多人| 精品视频导航| 日韩美女在线观看| 亚洲在线视频一区二区| 国产精品久久久久久久免费大片| 99精彩视频| 国产视频一区二区不卡| 人妻有码中文字幕| 亚洲综合av一区| 久久综合久久八八| 久久精品国产亚洲精品| 久久亚洲一区二区| 国产乱码精品一区二区三区日韩精品| 日本高清视频一区| 亚洲一区二区三区四区视频| 久久国产精品久久久久久久久久| 深夜成人在线观看| 久久久久高清| 99国产高清| 国产精品亚洲欧美导航| 国内精品国语自产拍在线观看| 热门国产精品亚洲第一区在线| 亚洲精品一区二区三区四区五区| 国产精品久久久久久搜索| 久久久久久久久久久久久久一区| 99视频免费观看蜜桃视频| 国产麻豆一区二区三区在线观看| 欧美日韩一区二区三区免费| 日本久久久a级免费| 日韩在线一级片| 天天干天天色天天爽| 亚洲日本精品国产第一区| 在线观看污视频| 一区二区三区我不卡| 精品综合久久久久久97| 久久成人国产精品| 欧美xxxx做受欧美.88| 国产精品视频白浆免费视频| 久久精品人人做人人爽| 久久久久久久久久久免费视频| 国产成人精品久久二区二区| 久久综合中文色婷婷| 久久久亚洲综合网站| 68精品久久久久久欧美| 久久综合亚洲精品| 国产黄色特级片| 久久久噜噜噜久久久| 日韩在线观看网址| 国产精品视频免费在线| 国产精品福利小视频| 国产精品成人va在线观看| 精品久久久久久亚洲| 综合久久国产| 天堂av一区二区| 日韩一级片一区二区| 日本黄网站色大片免费观看| 欧美一区二区综合| 蜜桃av久久久亚洲精品| 国产精品中文字幕在线| 91精品成人久久| 久久er99热精品一区二区三区|