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

          国产啪精品视频| 欧美日韩aaaaa| 一区二区欧美日韩| 国产精品久久九九| 欧美成人午夜激情视频| 亚洲无线视频| 亚洲精品欧美专区| 国产日韩精品一区二区三区在线| 免费视频一区二区三区在线观看| 在线观看福利一区| 欧美日韩在线一区二区| 久久免费视频在线观看| 中文av一区特黄| 亚洲精品国产精品乱码不99 | 午夜老司机精品| 亚洲每日在线| 亚洲国产欧美不卡在线观看| 国产午夜精品在线| 国产精品av久久久久久麻豆网| 欧美大片在线影院| 麻豆成人在线| 美女免费视频一区| 久久综合久久88| 久久久一区二区三区| 欧美一级在线视频| 欧美专区在线观看| 欧美一级成年大片在线观看| 午夜久久资源| 久久9热精品视频| 久久国产精品99久久久久久老狼 | 欧美视频在线观看一区| 久色成人在线| 欧美精品入口| 欧美日韩精品三区| 欧美午夜精品久久久久久孕妇 | 亚洲精选国产| 亚洲免费成人av| 一区二区三区国产盗摄| 99精品视频一区二区三区| 在线亚洲观看| 午夜日韩激情| 久久久噜噜噜久久中文字免| 久久婷婷国产综合尤物精品 | 一区免费观看视频| 亚洲激情在线播放| 亚洲老司机av| 久久成人精品视频| 欧美aa在线视频| 欧美深夜影院| 国产亚洲观看| 亚洲国产欧美日韩另类综合| 亚洲麻豆av| 亚洲一区精品在线| 久色婷婷小香蕉久久| 欧美乱大交xxxxx| 国产欧美日韩亚洲一区二区三区| 国产日韩视频| 亚洲美女av网站| 午夜精品久久久久久久久久久久 | 久久精品人人做人人爽| 欧美风情在线| 国产日韩欧美亚洲| 亚洲第一网站| 亚洲素人一区二区| 久久亚洲美女| 国产日韩精品在线| 99视频精品全国免费| 久久成人精品| 国产精品国产三级国产aⅴ浪潮| 一区二区视频免费完整版观看| 亚洲精品欧美| 美女露胸一区二区三区| 国产嫩草一区二区三区在线观看| 一区在线免费| 欧美制服丝袜第一页| 欧美日韩视频第一区| 黄色成人免费观看| 亚洲欧美日韩国产| 欧美日韩在线另类| 亚洲欧洲一级| 麻豆av福利av久久av| 欧美激情综合网| 黄色成人av网| 久久9热精品视频| 欧美午夜精品电影| 日韩午夜在线观看视频| 六月丁香综合| 在线免费观看日本欧美| 性欧美8khd高清极品| 国产精品理论片| 中文国产成人精品| 欧美色网一区二区| 亚洲视频第一页| 欧美日韩在线精品| 亚洲视频999| 狂野欧美一区| 亚洲国产精选| 老司机午夜精品| 一区在线影院| 裸体丰满少妇做受久久99精品 | 久久久久女教师免费一区| 国产精品色婷婷| 欧美在线你懂的| 国产一区二区三区日韩欧美| 午夜欧美精品| 国产一区视频在线观看免费| 久久黄色小说| 伊人一区二区三区久久精品| 久久免费精品日本久久中文字幕| 尤物精品在线| 欧美激情第二页| 中文日韩欧美| 国产手机视频精品| 久久精品国语| 在线看片一区| 欧美日韩和欧美的一区二区| 亚洲欧美成人一区二区三区| 国产专区一区| 欧美日本亚洲视频| 久久激情五月丁香伊人| 亚洲国产高清一区| 国产精品国产福利国产秒拍| 久久国产视频网站| 日韩视频在线一区二区| 国产精品男人爽免费视频1| 久久久精彩视频| 久久精品人人爽| 亚洲美女精品成人在线视频| 欧美日韩在线电影| 久久爱www.| 亚洲精品国产精品国自产在线 | 欧美一区二区精品| 亚洲国产精品久久久久秋霞蜜臀 | 欧美日韩国产在线一区| 欧美在线视频全部完| 亚洲黑丝在线| 国产亚洲精品aa午夜观看| 你懂的视频欧美| 欧美一区二区日韩| 夜夜爽av福利精品导航| 狠狠色狠狠色综合| 国产精品久久一级| 欧美日韩成人免费| 久久这里有精品视频| 欧美亚洲免费| 亚洲免费视频成人| 99成人精品| 亚洲福利视频一区| 国产真实久久| 国产乱肥老妇国产一区二| 欧美日韩亚洲一区三区| 免费亚洲视频| 久久夜色精品国产欧美乱| 亚洲资源在线观看| 亚洲一级网站| 在线视频一区观看| 99re6热只有精品免费观看 | 亚洲高清免费在线| 国产一区自拍视频| 国产美女精品在线| 国产精品一区二区黑丝| 欧美久久电影| 欧美日韩另类一区| 欧美激情国产精品| 欧美精品一区二区三区久久久竹菊 | 国产精品试看| 国产精品家庭影院| 国产精品久久久久三级| 国产精品久久久久久妇女6080| 欧美日韩一区二区三区视频| 嫩模写真一区二区三区三州| 久久综合五月| 欧美va亚洲va香蕉在线| 欧美国产亚洲精品久久久8v| 欧美成人a视频| 欧美日本韩国一区二区三区| 欧美激情女人20p| 欧美色欧美亚洲另类七区| 欧美性片在线观看| 国产精品永久免费视频| 国产日韩欧美在线播放| 激情视频一区二区| 亚洲三级国产| 亚洲一区二区三区午夜| 久久riav二区三区| 欧美成人综合在线| 欧美吻胸吃奶大尺度电影| 国产精品乱子久久久久| 国际精品欧美精品| 亚洲高清在线视频| 亚洲一区成人| 久久蜜桃香蕉精品一区二区三区| 美女脱光内衣内裤视频久久影院| 欧美成人免费大片| 国产精品日本精品| 一色屋精品视频免费看| 夜夜精品视频| 久久婷婷国产综合精品青草| 欧美日韩国产另类不卡| 国产亚洲免费的视频看|