国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

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

代做INT2067、Python編程設計代寫
代做INT2067、Python編程設計代寫

時間:2024-11-08  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



Assignment 1 
INT2067 Introduction to Programming and Problem Solving 
2024-2025 Semester 1 
Due Date: October 30, 2024 (Wednesday) 
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 Requirements (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 session. 
 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 f, g or c: move the fox, goose, or corn, if available, to the opposite shore 
along with the boat. [10%] 
o m: move the boat to the opposite shore without any item. [5%] 
o q: quit the game. [5%] 
 [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 lists 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 contain no spelling 
mistakes. 
7 Submission Requirements 
 Your Python file should be named as assignment1.py. Submit only the Python 
file assignment1.py through Moodle. Failure to submit the file properly will 
result in a penalty of 5 to 20 marks. 
 See Moodle for the exact time of the deadline for submission. Late submission is 
usually not accepted. You should submit earlier to avoid possibly high tra  ic 
around the deadline. 
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. 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. 
If cheating is found, both the copier and originator will get zero mark for the 
assignment. 
Repeat o  enders may result in a deduction of the course grade. 
If you have discussed the assignment with anyone, you should provide an 
acknowledgment at the end of your program file. Give the names of all classmates that 
you have discussed with. For example, your acknowledgement may look like this at the 
end of your program file: 
# Acknowledgement: I have discussed it with Thomas, Gordon, and Emily. 
10 Sample Session 1 
Welcome. 
You must 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 the items across the river. 
11 Sample Session 2 
Welcome. 
You must 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. 
References 
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





 

掃一掃在手機打開當前頁
  • 上一篇:代寫Neural Networks for Image 編程
  • 下一篇:SCC.369代做、代寫C/C++編程設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    日产国产精品精品a∨| 国产精品美女在线播放| 亚洲永久一区二区三区在线| 国产精品色悠悠| 国产成人精品日本亚洲专区61| 国产精品91在线观看| 国产女人18毛片| 国产午夜精品一区| 蜜桃av噜噜一区二区三| 日韩精品久久久免费观看| 日本乱人伦a精品| 欧美一区二区三区综合| 亚洲一区亚洲二区亚洲三区| 亚洲影院污污.| 欧美精品www在线观看| 欧美成aaa人片免费看| 国产成人精品视频在线| 深夜福利日韩在线看| 久久久久无码国产精品一区| 久久久精品网站| 日韩在线视频免费观看高清中文| 国产成人中文字幕| 色阁综合伊人av| 国产精品久在线观看| 欧美日韩电影在线观看| 中文字幕一区二区三区在线乱码| 一本久久a久久精品vr综合| 亚洲精品电影在线一区| 亚洲午夜精品一区二区| 精品自在线视频| 在线国产精品网| 在线观看成人一级片| 亚洲三区在线观看| 欧美一区免费视频| 免费av网址在线| 国产美女精品免费电影| 91精品视频观看| 国产极品精品在线观看| 久久精品女人的天堂av| 国产精品日韩欧美一区二区| 欧美精品做受xxx性少妇| 在线一区亚洲| 欧美日韩精品一区| 国产区精品视频| 91精品国产91久久久久福利| 国产成人精品免高潮在线观看| 久久久久北条麻妃免费看| 国产精品久久网| 亚洲视频欧美在线| 日韩毛片在线免费看| 狠狠色综合一区二区| 97久久精品在线| 久久国产精品久久精品国产| 国产精品日韩av| 亚洲在线观看视频| 秋霞毛片久久久久久久久| 国产综合精品一区二区三区| 91精品国产91| 久久国产精品久久久| 欧美一区深夜视频| 久久久最新网址| 欧美激情a在线| 免费在线a视频| 久久久久久亚洲精品不卡4k岛国| 亚洲视频导航| 国产日韩在线一区| 国产精品网红直播| 欧日韩免费视频| 久久久久久久久一区二区| 亚洲a中文字幕| 99久久国产免费免费| 毛片精品免费在线观看| 欧美 日韩 国产精品| 久久久久久久久电影| 偷拍盗摄高潮叫床对白清晰| 成人免费毛片播放| 国产精品视频内| 欧美中文在线观看国产| 国产v综合ⅴ日韩v欧美大片| 亚洲a∨一区二区三区| 成人黄色一区二区| 久久久久久com| 高清在线观看免费| 一本久道久久综合狠狠爱亚洲精品| 国模吧无码一区二区三区| 国产成人欧美在线观看| 欧美与黑人午夜性猛交久久久 | 国产欧美日韩亚洲精品| 国产精品久久97| 欧美午夜精品久久久久免费视| 色偷偷888欧美精品久久久| 日本高清不卡一区二区三| 91国产视频在线播放| 日韩在线三级| 日韩亚洲欧美中文在线| 精品欧美日韩| 欧美日韩国产成人| 成人h视频在线| 亚洲 国产 日韩 综合一区| 91干在线观看| 日本天堂免费a| 久久久久久久久久亚洲| 欧美亚洲免费在线| 久久亚洲精品一区| 国产伦精品一区二区三区免| 色综合五月天导航| 68精品国产免费久久久久久婷婷| 欧美一区二区.| 久久精品成人欧美大片古装| 美女主播视频一区| 综合色婷婷一区二区亚洲欧美国产 | 中文字幕久精品免| 91久久国产婷婷一区二区| 午夜精品久久久久久久99黑人| 久久手机在线视频| 欧美福利精品| 一区二区三区日韩视频| 97精品视频在线| 日产国产精品精品a∨| 色琪琪综合男人的天堂aⅴ视频| 欧美激情亚洲天堂| 中文字幕一区二区三区有限公司 | 国产成人精品视频在线观看| 国产中文字幕亚洲| 亚洲欧美日韩国产成人综合一二三区| 久久久欧美精品| 黄黄视频在线观看| 国产99久久久欧美黑人| 久久av免费一区| 国产日韩欧美黄色| 日本国产欧美一区二区三区| 欧美精品生活片| 久久超碰亚洲| 国产精品自产拍在线观看中文| 日韩尤物视频| 国产精品高潮呻吟久久av野狼| 91精品久久久久久久久久久久久| 欧美人与动牲交xxxxbbbb| 一级做a爰片久久| 久久精品成人动漫| 99视频免费播放| 欧美极品日韩| 亚洲日本无吗高清不卡| 国产精品美女久久久久av超清| 91精品成人久久| 精品视频一区二区三区四区| 日本久久久网站| 伊人婷婷久久| 精品国模在线视频| 久久人人爽爽人人爽人人片av| 国产一区二区在线视频播放| 日韩欧美亚洲v片| 亚洲人一区二区| 欧美成人精品在线观看| 久久深夜福利免费观看| 久久综合入口| 99精品视频播放| 国产真实乱子伦| 欧美日韩三区四区| 日韩欧美亚洲v片| 午夜精品www| 亚洲一区精品视频| 欧美激情视频在线免费观看 欧美视频免费一 | 国产一区二区三区色淫影院| 欧美重口乱码一区二区| 亚洲一区二区三区精品动漫 | 日本免费一级视频| 亚洲 自拍 另类小说综合图区| 欧美人与性动交| 久久国产精品电影| 国产精品成人品| 国产精品高清免费在线观看| 久久视频在线免费观看| 俺去了亚洲欧美日韩| 久久www免费人成精品| 国产成人一区二区在线| 国产富婆一区二区三区| 久久人人爽人人爽人人片av高清 | 人妻内射一区二区在线视频| 日本一区二区三区免费观看| 亚洲v国产v在线观看| 亚洲国产另类久久久精品极度| 亚洲影视中文字幕| 亚洲精品久久区二区三区蜜桃臀 | 午夜精品三级视频福利| 亚洲www在线| 欧美一区二区福利| 日本不卡免费高清视频| 日韩精品一区二区三区不卡| 日韩免费视频在线观看| 日本10禁啪啪无遮挡免费一区二区| 日本精品久久久久久久| 欧美在线一区二区三区四区| 欧美二区在线看| 国产在线一区二区三区| 国产日韩欧美自拍| 成人亚洲欧美一区二区三区| 91免费版网站入口| 91成人免费视频| 国产成人在线免费看|