99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

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

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語言程序
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網

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

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

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                一本大道久久a久久精二百 | 欧美喷水一区二区| 久久免费偷拍视频| 精品一区二区在线播放| 日韩欧美激情一区| 老色鬼精品视频在线观看播放| 精品99999| 成人免费三级在线| 亚洲三级免费电影| 91福利视频网站| 久久夜色精品国产欧美乱极品| 精品综合免费视频观看| 欧美xxxxx牲另类人与| 精品一区二区三区视频在线观看| 精品国产免费一区二区三区四区 | 91精品国产黑色紧身裤美女| 日韩成人精品在线观看| 日韩欧美国产wwwww| 国产福利一区二区三区视频在线 | 六月丁香婷婷色狠狠久久| 日韩欧美高清在线| 国产成人在线电影| 亚洲天堂免费看| 久久久久综合网| 91麻豆成人久久精品二区三区| 中文字幕在线视频一区| 欧美在线观看你懂的| 免费日韩伦理电影| 久久一区二区三区四区| 欧美三级电影精品| 国产成人啪午夜精品网站男同| 3d动漫精品啪啪| 欧洲色大大久久| 国产一区二区精品久久91| 亚洲嫩草精品久久| 精品国产一区二区亚洲人成毛片| 成人高清视频在线观看| 国产乱理伦片在线观看夜一区| 尤物av一区二区| 久久精品人人做人人综合| 在线观看一区二区精品视频| 亚洲欧美一区二区三区久本道91| 久久亚洲综合av| 不卡的av电影在线观看| 日韩影视精彩在线| 欧美日韩三级视频| 成人av在线资源网站| 婷婷中文字幕综合| 国产精品久久久久久福利一牛影视| 亚洲欧美另类久久久精品| 久久久久久久综合| 欧美日韩dvd在线观看| 色综合久久久久久久久久久| 美女视频网站黄色亚洲| 激情综合色综合久久| 国产又黄又大久久| 国产黄色91视频| jizz一区二区| 欧美午夜一区二区| 欧美精品vⅰdeose4hd| 欧美日韩卡一卡二| 日韩欧美黄色影院| 国产日韩欧美精品一区| 中文字幕一区二区三区不卡| 亚洲激情男女视频| 日韩高清不卡一区二区三区| 蜜桃精品在线观看| 成人午夜私人影院| 欧美视频自拍偷拍| 日韩精品一区二区三区四区视频| 久久久久99精品国产片| 国产精品成人免费在线| 亚洲制服欧美中文字幕中文字幕| 亚洲成人资源网| 国产一区二区三区蝌蚪| 91视频国产观看| 欧美一区午夜精品| 综合色中文字幕| 久久成人麻豆午夜电影| 夫妻av一区二区| 欧美日韩国产精品成人| 国产精品污网站| 亚洲自拍偷拍av| 国产成人在线视频免费播放| 欧洲一区二区av| 日本一区二区三区四区| 亚洲综合激情另类小说区| 精品一区二区三区欧美| 欧美午夜一区二区三区| 欧美激情一区二区三区| 天堂资源在线中文精品| 不卡av在线免费观看| 精品欧美久久久| 午夜欧美大尺度福利影院在线看| 高清不卡在线观看av| 欧美日韩夫妻久久| 亚洲免费在线看| 99re视频精品| 亚洲国产精品t66y| 极品少妇xxxx偷拍精品少妇| 欧美三级电影网站| 国产精品视频免费看| 久久国产乱子精品免费女| 欧美精品乱人伦久久久久久| 中文字幕制服丝袜一区二区三区| 国产自产高清不卡| 欧美电影免费观看完整版| 亚洲成人精品一区| 欧美丝袜丝交足nylons图片| 国产精品色一区二区三区| 欧美96一区二区免费视频| 欧美在线视频日韩| 一区二区欧美国产| 欧美视频日韩视频在线观看| 亚洲美女电影在线| 91在线精品一区二区| 中文字幕在线一区二区三区| thepron国产精品| 国产精品短视频| a亚洲天堂av| 中文字幕色av一区二区三区| 懂色av一区二区在线播放| 国产亚洲短视频| 成人一二三区视频| 最新国产精品久久精品| 色综合亚洲欧洲| 亚洲电影第三页| 欧美久久久久免费| 蜜臀av亚洲一区中文字幕| 日韩女优电影在线观看| 国产在线视频不卡二| 中文无字幕一区二区三区| 97精品久久久久中文字幕 | 亚洲女同一区二区| 欧美撒尿777hd撒尿| 日日摸夜夜添夜夜添国产精品 | 日韩欧美的一区| 久久91精品久久久久久秒播| 久久精品综合网| av中文字幕在线不卡| 夜夜精品视频一区二区| 在线区一区二视频| 日韩av不卡一区二区| 日韩精品一区二区三区三区免费| 国产麻豆精品一区二区| 国产精品久久久久一区二区三区| 色综合久久九月婷婷色综合| 亚洲一区二区偷拍精品| 91精品国产高清一区二区三区 | 91浏览器在线视频| 日本中文字幕一区二区视频 | 亚洲丝袜另类动漫二区| 欧美色精品在线视频| 国产制服丝袜一区| 一区二区三区中文字幕| 欧美大片一区二区| 99久久精品国产一区| 亚洲成人一区二区在线观看| 久久人人超碰精品| 欧美亚一区二区| 国产乱一区二区| 亚洲最大色网站| 久久久精品蜜桃| 欧美伊人精品成人久久综合97| 久久99国产精品久久99| 夜夜嗨av一区二区三区| 久久久九九九九| 欧美日本在线看| 91视频在线观看| 国产精品一区二区无线| 亚洲电影在线免费观看| 国产欧美一区二区三区在线老狼| 欧美精品亚洲二区| 91丨porny丨首页| 国产一区二区三区免费| 日韩黄色小视频| 亚洲成年人网站在线观看| 中文字幕在线不卡视频| 精品国产乱码久久| 欧美日韩国产系列| 日本高清不卡aⅴ免费网站| 国产馆精品极品| 精品一区二区三区蜜桃| 天天av天天翘天天综合网色鬼国产| 日韩毛片视频在线看| 中文字幕欧美区| 欧美激情在线免费观看| 久久久久久久久伊人| 精品剧情在线观看| 日韩欧美一级二级三级| 欧美日韩亚洲综合一区| 色综合中文字幕国产 | 成人免费三级在线| 国产一区999| 国产精品一区二区免费不卡| 精品在线观看视频| 日韩不卡一区二区| 日本色综合中文字幕| 日韩在线播放一区二区| 婷婷综合五月天|