加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

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

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

    婷婷成人在线| 成人在线啊v| 可以看av的网站久久看| 欧美视频亚洲视频| 中文字幕日本一区| 素人一区二区三区| 亚洲综合丁香| 色999韩欧美国产综合俺来也| 精品视频亚洲| 国产一区二区区别| 一区二区三区精品视频在线观看| 日本一本不卡| 狠狠爱www人成狠狠爱综合网| 日本亚洲视频| 亚洲免费资源| 免费永久网站黄欧美| 妞干网免费在线视频| 亚洲欧美日韩综合国产aⅴ| 人人精品亚洲| **爰片久久毛片| 成人乱码手机视频| 美女国产一区二区三区| 日本美女久久| caoporn视频在线观看| 亚洲欧美成人综合| 欧州一区二区| 老牛精品亚洲成av人片| 日韩二区在线观看| 亚洲欧洲日韩精品在线| 国产一区高清| 国产成人免费9x9x人网站视频| 久久亚洲国产精品一区二区| 不卡视频在线| 精品日产免费二区日产免费二区 | 国产精品久久国产愉拍| 欧美第一视频| 亚洲第一av| 在线手机中文字幕| 多野结衣av一区| 超碰成人av| 激情aⅴ欧美一区二区欲海潮 | 怡红院成人在线| 亚洲精品mv| 日韩免费一区| 电影天堂国产精品| 青青在线精品| 久久婷婷五月综合色丁香| 日韩高清欧美| www.久久.com| 国产成人精选| 国产精品久久久一区二区| 精品美女一区| 日日摸夜夜添夜夜添亚洲女人| 精品亚洲a∨| 免费亚洲视频| 亚洲日本中文| 日韩成人精品视频| 91欧美日韩在线| 久久精品色综合| 欧美 日韩 国产 一区| 偷偷www综合久久久久久久| 成人短片线上看| 国产亚洲精品自拍| 国产精品成人a在线观看| 最近在线中文字幕| 亚洲精品伦理| 日本不卡视频一二三区| 一区在线不卡| 在线观看视频一区二区三区| 久久久777| 伊人久久婷婷| 久久国产亚洲| 激情视频亚洲| 欧洲亚洲成人| 亚洲激情社区| 狼人综合视频| 欧美一区国产在线| 国产探花在线精品一区二区| 亚洲最好看的视频| 久久久久91| 制服诱惑一区二区| 麻豆视频在线看| 国产精品久久久亚洲一区| 国产高清日韩| 欧美精品中文| 先锋影音久久| 在线观看精品| 国产aⅴ精品一区二区四区| 久久的色偷偷| 国产99久久| 免费在线看成人av| 色综合久久久| 亚洲尤物av| 91精品一区二区三区综合在线爱 | 丝袜美腿亚洲一区| 国产一区高清| 亚洲三级精品| 国精品一区二区三区| 国产精品久久久久久久久妇女| 久久精品av麻豆的观看方式| 日韩mv欧美mv国产网站| 亚洲私人影院| 日本三级一区| 国产成人3p视频免费观看| 久久91在线| 97精品国产一区二区三区| 日本va欧美va精品| 精品欠久久久中文字幕加勒比| 麻豆久久婷婷| 欧美日韩一卡| 亚洲福利久久| 久久99久久99精品免观看软件| 国产精品毛片aⅴ一区二区三区 | 午夜在线精品偷拍| 欧美久久久网站| 亚洲视频一起| 久热精品在线| 久久香蕉网站| 精品人人人人| 日韩精品第一区| 午夜欧洲一区| 99re国产精品| 日韩高清不卡一区二区三区| 精品视频网站| 午夜裸体女人视频网站在线观看| 国产成人免费视频网站视频社区| 亚洲午夜91| 欧美一区高清| 久久精品高清| 韩日一区二区| 国内露脸中年夫妇交换精品| 91综合视频| 午夜视频在线观看精品中文| 老妇喷水一区二区三区| 国产精品久久久久久av公交车| 天天做综合网| 亚洲天堂免费| 一本色道久久综合亚洲精品不卡| 国产精品久久久免费| 欧美日韩精品一区二区视频| 另类一区二区| 亚洲一级二级| 老司机免费视频一区二区| 国内成人自拍| 久久国产精品亚洲人一区二区三区| 日韩在线精品| 999在线精品| 日韩av福利| 久久91在线| 久久精品久久99精品久久| 久久男女视频| 日日夜夜精品免费视频| 免费视频亚洲| 久久久久观看| 日韩在线观看一区二区| 日本午夜精品久久久| 亚洲天堂av影院| 红杏aⅴ成人免费视频| 亚洲国产aⅴ精品一区二区三区| 国产精品久av福利在线观看| 国产成人精品一区二区三区在线| 色综合久久中文| 日本不卡视频一二三区| 国产亚洲在线| 久久中文字幕一区二区| 亚洲欧洲高清| 神马午夜久久| 国产精品a久久久久| 久久亚洲不卡| 98视频精品全部国产| 国产一区2区在线观看| 免费视频一区三区| 国产一区二区三区免费在线| 国产精品久久天天影视| 欧美私人啪啪vps| 日韩成人精品一区二区三区| 黄色av日韩| 日本一区影院| 久久精品国产免费看久久精品 | 欧美三级午夜理伦三级在线观看 | 欧洲激情综合| 日本三级久久| 男人天堂久久| 蜜臀va亚洲va欧美va天堂| 欧美黑人巨大videos精品| 亚洲人成毛片在线播放女女| 丝袜美腿亚洲综合| 99tv成人| 日韩欧美黄色| 欧美在线不卡| 日产精品一区二区| 国产在线不卡| 日本亚洲最大的色成网站www| 久久激情五月激情| 三上亚洲一区二区| 国产一区久久| 一区二区三区高清在线观看| 亚洲美女91| 欧美成人精品三级网站| 性一交一乱一区二区洋洋av|