日韩精品一区二区三区高清_久久国产热这里只有精品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語言程序
  • 無相關信息
    合肥生活資訊

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

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

    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>
        国产在线国偷精品产拍免费yy| 久久久免费av| 亚洲一区国产一区| 免费观看国产成人| 国产在线国偷精品产拍免费yy| 亚洲国产精品女人久久久| 最新国产の精品合集bt伙计| 国产精品久在线观看| av不卡在线看| 亚洲综合欧美| 亚洲黄色成人久久久| 国产视频在线观看一区二区| 亚洲影院在线观看| 欧美一级二级三级蜜桃| 久久免费视频在线观看| 亚洲乱码国产乱码精品精| 亚洲成人中文| 亚洲主播在线观看| 亚洲小说欧美另类社区| 欧美激情亚洲一区| 久久人人爽国产| 美女福利精品视频| 亚洲一区二区三区久久| 蜜月aⅴ免费一区二区三区| 日韩亚洲精品在线| 国产精品福利久久久| 欧美在线精品免播放器视频| 国产精品你懂的在线欣赏| 一区二区日韩伦理片| 欧美日韩中文字幕在线| 亚洲韩国精品一区| 久久夜精品va视频免费观看| 尤物网精品视频| 国产精品每日更新在线播放网址| 亚洲一区欧美激情| 久久成人免费网| 欧美资源在线| 亚洲视频二区| 久久gogo国模裸体人体| 久久国产精品99久久久久久老狼| 久久精品人人做人人爽| 韩国女主播一区二区三区| 欧美一区二区在线免费观看| 欧美另类专区| 激情婷婷亚洲| 久久视频在线视频| 在线精品视频免费观看| 亚洲黄色尤物视频| 久久精品免费播放| 黄色精品一二区| 久久性色av| 亚洲高清三级视频| 国产精品美女主播| 国内成人在线| 久久蜜桃av一区精品变态类天堂| 欧美高清视频一区二区| 久久亚洲春色中文字幕久久久| 老司机凹凸av亚洲导航| 国产精品久久久久永久免费观看| 欧美精品自拍偷拍动漫精品| 国产午夜精品久久久久久久| 亚洲综合清纯丝袜自拍| 久久国产精品久久精品国产| 国产精品美女黄网| 欧美日韩中国免费专区在线看| 国产美女精品视频免费观看| 欧美专区一区二区三区| 亚洲欧美另类久久久精品2019| 国产精品任我爽爆在线播放| 国产精品色一区二区三区| 欧美天堂亚洲电影院在线播放| 亚洲网在线观看| 欧美喷水视频| 免费观看成人鲁鲁鲁鲁鲁视频| 亚洲淫性视频| 欧美午夜免费| 欧美激情导航| 国产欧美日韩麻豆91| 嫩草影视亚洲| 欧美色区777第一页| 日韩视频在线观看一区二区| 一本一本大道香蕉久在线精品| 久久亚洲一区二区| 精品91在线| 日韩系列欧美系列| 欧美日韩性生活视频| 亚洲性视频网址| 欧美在线国产精品| 一本一本久久a久久精品牛牛影视| 亚洲精品视频在线观看网站| 亚洲国产日韩欧美在线99| 欧美激情精品久久久久久| 欧美激情视频在线免费观看 欧美视频免费一| 欧美片在线播放| 欧美在线视频日韩| 国产精品久久久久99| 夜夜嗨av色综合久久久综合网| 久久天天躁狠狠躁夜夜av| 黄色成人av网站| 久久久最新网址| 欧美日韩国产丝袜另类| 欧美日韩亚洲国产一区| 久久久久久自在自线| 欧美日韩国产91| 黄色在线一区| 亚洲免费观看视频| 国产又爽又黄的激情精品视频| 欧美一级视频精品观看| 欧美日韩另类在线| 亚洲自拍偷拍福利| 久久成人免费网| 欧美国产欧美亚洲国产日韩mv天天看完整| 久久综合色88| 欧美大片网址| 国产精品久久久爽爽爽麻豆色哟哟| 噜噜噜噜噜久久久久久91| 欧美综合国产| 欧美黑人多人双交| 一区二区在线视频| 欧美久久电影| 欧美新色视频| 欧美调教vk| 在线欧美不卡| 国产亚洲精品v| 亚洲国产精品悠悠久久琪琪| 久久久人成影片一区二区三区| 久久久久久亚洲精品杨幂换脸| 亚洲国产精品一区二区第一页| 久久aⅴ乱码一区二区三区| 国产美女精品| 欧美日韩国产黄| 欧美二区在线观看| 国产精品日韩| 久久久久国内| 国产欧美日韩精品a在线观看| 国产精品色一区二区三区| 一区二区三区色| 亚洲免费av电影| 国产精品久久999| 久久久亚洲精品一区二区三区| 欧美日韩一二三区| 夜夜嗨av色一区二区不卡| 一区二区三区久久久| 在线成人黄色| 亚洲精品免费一区二区三区| 亚洲一区二区少妇| 在线观看日韩av电影| 一本大道久久a久久综合婷婷| 午夜欧美精品| 一本色道久久综合亚洲91| 亚洲二区在线观看| 欧美精品aa| 海角社区69精品视频| 国内精品久久久久国产盗摄免费观看完整版| 欧美夫妇交换俱乐部在线观看| 99精品热视频只有精品10| 国产综合色产| 国产日韩高清一区二区三区在线| 久久国产66| 久久成人综合视频| 91久久精品一区二区三区| 国模一区二区三区| 欧美精品一区二区久久婷婷| 欧美三级乱人伦电影|