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爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          国产精品第十页| 国产日韩亚洲欧美精品| 亚洲女人天堂av| 一区二区在线不卡| 欧美视频一区在线观看| 久久尤物视频| 亚洲欧美在线另类| 一区二区三区回区在观看免费视频| 国产欧美日韩视频一区二区三区| 欧美大胆人体视频| 久久激情视频| 亚洲欧美日韩网| 在线综合亚洲欧美在线视频| 在线精品国产成人综合| 在线播放亚洲一区| 国产精品人人做人人爽人人添| 欧美ed2k| 理论片一区二区在线| 久久久久久久久伊人| 亚洲欧美日韩精品久久奇米色影视| 亚洲精品美女在线| 亚洲人成网站777色婷婷| 激情久久中文字幕| 狠狠综合久久av一区二区老牛| 国产精品久久久久久久久婷婷| 欧美激情bt| 欧美高清视频一区二区| 免费在线看一区| 免费成人黄色| 欧美福利视频网站| 欧美精品一区在线发布| 欧美日韩国产小视频在线观看| 欧美大色视频| 欧美日韩激情小视频| 欧美视频网站| 国产精品免费视频观看| 国产精品永久免费观看| 国产麻豆精品久久一二三| 国产美女高潮久久白浆| 国产亚洲精品bt天堂精选| 国产揄拍国内精品对白| 永久免费毛片在线播放不卡| 激情久久久久久久| 亚洲欧洲一区二区三区| 一本久道久久综合婷婷鲸鱼| 亚洲自拍偷拍一区| 久久国产加勒比精品无码| 久久综合婷婷| 欧美日韩国产影片| 国产精品试看| 伊人激情综合| 99re6热在线精品视频播放速度| 一区二区福利| 久久精品国产亚洲一区二区三区| 久久久久久一区二区三区| 欧美华人在线视频| 国产精品久久网站| 在线观看一区二区精品视频| 日韩午夜视频在线观看| 欧美主播一区二区三区| 欧美国产精品v| 国产精品美女久久久久av超清 | 欧美日韩在线一区二区| 国产欧美精品va在线观看| 亚洲高清视频在线观看| 亚洲淫片在线视频| 久热这里只精品99re8久| 欧美日韩天堂| 黄色一区二区三区| 亚洲视频狠狠| 狂野欧美激情性xxxx欧美| 国产精品久久久久秋霞鲁丝| 一区二区三区在线看| 亚洲午夜久久久久久久久电影院 | 久久久精品国产99久久精品芒果| 男女av一区三区二区色多| 国产精品区一区| 亚洲精品免费一区二区三区| 久久高清一区| 国产精品久久久久久久久免费| 亚洲国产精品va在线看黑人动漫| 亚洲欧美激情诱惑| 欧美日韩国产专区| 亚洲激情网站免费观看| 久久国产欧美精品| 国产美女精品视频免费观看| 夜色激情一区二区| 美女精品视频一区| 韩国精品久久久999| 欧美一区二区三区日韩| 国产精品人人做人人爽人人添| 日韩午夜电影在线观看| 欧美电影美腿模特1979在线看| 国产一区二区成人| 久久国产精品久久久久久久久久| 国产精品视频自拍| 亚洲欧美日本伦理| 国产精品网红福利| 欧美一级二级三级蜜桃| 国产乱码精品一区二区三| 亚洲综合色视频| 国产精品日韩欧美大师| 亚洲伊人久久综合| 国产欧美日韩精品专区| 欧美一区综合| 精品二区久久| 蜜桃精品久久久久久久免费影院| 激情欧美一区二区三区| 久久香蕉国产线看观看av| 在线成人小视频| 欧美国产日韩一区| 一区二区三区日韩欧美| 国产精品日韩欧美综合| 午夜激情综合网| 国产一级精品aaaaa看| 久久影视三级福利片| 亚洲高清在线观看一区| 欧美电影免费观看大全| 亚洲一级高清| 国产午夜精品视频| 农村妇女精品| 中日韩美女免费视频网址在线观看| 欧美日韩一区二区国产| 欧美一级网站| 亚洲国语精品自产拍在线观看| 欧美日韩爆操| 欧美在线一二三区| 亚洲精品国精品久久99热| 国产精品久久久久久久久果冻传媒 | 99人久久精品视频最新地址| 国产精品超碰97尤物18| 久久aⅴ国产紧身牛仔裤| 最近中文字幕日韩精品 | 久久激情视频久久| 亚洲人成网站影音先锋播放| 国产精品网站在线观看| 另类av导航| 亚洲欧美综合网| 亚洲激情黄色| 国内精品久久久| 国产精品xnxxcom| 欧美成在线观看| 久久精品卡一| 亚洲男女毛片无遮挡| 亚洲毛片视频| 亚洲国产精品久久久久婷婷884| 国产精品成人国产乱一区| 蜜桃av久久久亚洲精品| 香港久久久电影| 亚洲天堂成人| 99re亚洲国产精品| 最新日韩精品| 亚洲国产日韩精品| 韩日视频一区| 韩国av一区二区三区| 国产精品影片在线观看| 欧美色图五月天| 欧美精彩视频一区二区三区| 久久久99精品免费观看不卡| 午夜伦理片一区| 亚洲一线二线三线久久久| 一区二区高清| 亚洲视频免费在线| 99精品国产在热久久| 亚洲经典自拍| 亚洲精选久久| 99精品国产一区二区青青牛奶| 亚洲国产日韩欧美在线99| 在线国产精品一区| 亚洲成色www8888| 亚洲国产岛国毛片在线| 精品999在线观看| 亚洲韩国日本中文字幕| 最新高清无码专区| 亚洲日本久久| 亚洲视频网在线直播| 亚洲一区二区三区四区五区黄| 亚洲无线视频| 午夜精品一区二区在线观看 | 欧美伊久线香蕉线新在线| 久久成人国产| 美女成人午夜| 欧美日韩美女在线| 国产精品一区二区黑丝| 国产一区二区无遮挡| 伊人久久男人天堂| 亚洲精选在线| 亚洲永久免费| 久久久亚洲高清| 欧美日韩国产精品一区二区亚洲| 欧美天堂在线观看| 国产一区高清视频| 最新中文字幕亚洲| 亚洲在线国产日韩欧美| 久久九九国产精品| 欧美日韩久久| 一区二区亚洲精品国产| 一区二区三区日韩| 久久另类ts人妖一区二区 | 亚洲深夜福利视频|