日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

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

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

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 目錄網 排行網

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

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

    日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

      <em id="rw4ev"></em>

        <tr id="rw4ev"></tr>

        <nav id="rw4ev"></nav>
        <strike id="rw4ev"><pre id="rw4ev"></pre></strike>
        欧美无砖砖区免费| 国产欧美一区二区精品性| 国产精品资源| 久久精品视频在线| 亚洲午夜精品久久久久久app| 久久先锋影音av| 宅男噜噜噜66一区二区66| 狠狠色丁香婷婷综合久久片| 久久久久国色av免费观看性色| 亚洲激情成人网| 久久国产精品99久久久久久老狼| 亚洲高清免费视频| 国产在线精品自拍| 狠狠色狠狠色综合人人| 欧美在线观看网址综合| 这里是久久伊人| 亚洲午夜一区二区| 欧美成人69av| 亚洲免费成人av电影| 欧美久久久久久| 亚洲一区自拍| 国产综合网站| 亚洲狼人精品一区二区三区| 久久频这里精品99香蕉| 国产精品九九久久久久久久| 欧美人与禽性xxxxx杂性| 欧美精品久久久久久久免费观看| 久久男人av资源网站| 免费中文字幕日韩欧美| 久久久中精品2020中文| 亚洲精品久久久久久下一站| 亚洲视频在线观看一区| 激情懂色av一区av二区av| 久久成人免费日本黄色| 免费观看在线综合| 国产精品综合| 欧美gay视频| 国产精品草莓在线免费观看| 中文欧美在线视频| 另类av导航| 亚洲国产精品成人综合| 亚洲综合色噜噜狠狠| 久久―日本道色综合久久| 91久久在线观看| 久久午夜国产精品| 久久久久久亚洲精品杨幂换脸| 欧美成人精品激情在线观看| 久久久久国产精品一区二区| 黄网站色欧美视频| 国产主播精品| 欧美国产精品va在线观看| 欧美视频不卡中文| 久久久久成人精品免费播放动漫| 亚洲国产精彩中文乱码av在线播放| 久久久爽爽爽美女图片| 最新中文字幕亚洲| 国产精品久久久久久久久久三级| 国产精品婷婷午夜在线观看| 国产精品免费福利| 国产欧美一区二区三区另类精品| 欧美交受高潮1| 国产午夜亚洲精品理论片色戒| 先锋a资源在线看亚洲| 精品不卡在线| 欧美国产视频在线观看| 亚洲激情视频在线播放| 国产一区二区三区高清播放| 欧美精品v国产精品v日韩精品| 欧美精品免费在线观看| 亚洲免费电影在线观看| 蜜月aⅴ免费一区二区三区| 西西人体一区二区| 亚洲伦理在线免费看| 欧美尤物巨大精品爽| 韩日在线一区| 免费成人你懂的| 国产欧美在线视频| 欧美性一区二区| 亚洲一区二区三区四区视频| 亚洲一区二区三区精品视频| 国内精品伊人久久久久av一坑| 伊人成综合网伊人222| 国产综合久久久久久鬼色| 国产亚洲精品v| 国产精品www| 亚洲国产综合在线看不卡| 激情小说另类小说亚洲欧美| 国产亚洲一区二区三区在线观看| 在线日韩av片| 国产精品美女| 蜜桃av久久久亚洲精品| 亚洲精品1区2区| 国产麻豆综合| 曰本成人黄色| 樱桃国产成人精品视频| 中日韩美女免费视频网址在线观看| 91久久嫩草影院一区二区| 一区二区三区四区五区精品视频| 国产精品一区亚洲| 久久理论片午夜琪琪电影网| 久久亚洲精选| 亚洲欧美日韩精品久久亚洲区| 欧美精品亚洲一区二区在线播放| 亚洲激情校园春色| 欧美国产日韩一区二区| 欧美精品一区二区视频| 欧美不卡高清| 欧美日韩亚洲一区三区| 日韩视频一区| 欧美粗暴jizz性欧美20| 欧美高清在线精品一区| 国产精品视频专区| 韩日精品视频一区| 久久国产精品久久久| 亚洲欧美日韩中文播放| 亚洲黄色成人久久久| 午夜精品福利在线观看| 国产片一区二区| 欧美v亚洲v综合ⅴ国产v| 欧美国产一区在线| 亚洲人成网站影音先锋播放| 国产日韩欧美麻豆| 欧美一区二区性| 一区二区三区|亚洲午夜| 欧美激情一区二区三级高清视频| 欧美国产亚洲精品久久久8v| 亚洲女女做受ⅹxx高潮| 亚洲福利视频二区| 亚洲高清在线视频| 国产精品视频xxxx| 一色屋精品亚洲香蕉网站| 欧美在线欧美在线| 亚洲人成网站在线观看播放| 国产精品分类| 欧美一级淫片播放口| 伊人久久综合| 欧美日韩在线视频一区| 国产精品国产一区二区| 欧美aa在线视频| 欧美日产国产成人免费图片| 国产精品资源| 精品粉嫩aⅴ一区二区三区四区| 欧美日韩午夜剧场| 欧美中文在线免费| 国产亚洲一本大道中文在线| 在线成人av| 国产精品午夜电影| 欧美日韩国产一区二区三区| 久久一区二区三区四区五区| 亚洲国产一区二区三区在线播| 久久成人国产| 久久成人18免费网站| 国产精品乱码人人做人人爱| 欧美人与性动交a欧美精品| 亚洲欧美日韩中文在线制服| 麻豆精品精品国产自在97香蕉| 欧美国产亚洲视频| 在线免费观看日韩欧美| 亚洲免费福利视频| 国产午夜精品福利| 欧美日韩一区二区三区四区在线观看| 先锋影音久久久| 国产亚洲女人久久久久毛片| 国产精品日韩欧美大师|