99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

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

代做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++編程設計
  • 無相關信息
    合肥生活資訊

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

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

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

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          欧美日韩另类综合| 欧美片第1页综合| 久久综合久久综合这里只有精品| 久久久av毛片精品| 嫩草伊人久久精品少妇av杨幂| 欧美大尺度在线观看| 欧美精品99| 国产精品国产三级国产普通话99 | 亚洲图片在线| 欧美一区免费| 欧美黄污视频| 国产美女精品视频| 亚洲国产成人av好男人在线观看| 日韩亚洲国产精品| 午夜日韩在线观看| 欧美大片国产精品| 国产精品福利片| 激情久久综艺| 亚洲午夜一级| 噜噜噜91成人网| 国产精品毛片| 最近中文字幕日韩精品| 亚洲欧美精品中文字幕在线| 美女黄毛**国产精品啪啪| 国产精品www994| 亚洲国产一区二区三区在线播| 亚洲自拍三区| 欧美精品久久久久久久| 国产综合久久久久久鬼色| 99精品视频免费观看| 老司机午夜免费精品视频| 国产乱码精品| 亚洲一区二区三区高清不卡| 欧美黄色一级视频| 国产亚洲欧洲一区高清在线观看 | 一本久道久久综合婷婷鲸鱼| 久久久噜噜噜久噜久久| 国产日本欧美在线观看| 一本综合精品| 欧美日韩精品系列| 亚洲国产欧美在线| 久久久人人人| 国产午夜亚洲精品理论片色戒| 亚洲毛片av| 欧美国产亚洲精品久久久8v| 在线观看91精品国产入口| 午夜伦理片一区| 国产精品萝li| 亚洲欧美网站| 国产精品亚洲综合天堂夜夜 | 欧美xx视频| 狠狠爱成人网| 久久精品中文| 韩国成人精品a∨在线观看| 欧美一区二区三区视频| 国产精品一二一区| 亚洲一区二区动漫| 国产精品久久国产三级国电话系列| 日韩天堂av| 欧美日韩福利| 亚洲欧美国产精品桃花| 国产精品美女诱惑| 亚洲影院色在线观看免费| 国产精品久久久久久久久果冻传媒| 亚洲国产欧美在线人成| 欧美刺激性大交免费视频| 亚洲美女精品成人在线视频| 欧美日韩精品一区| 亚洲欧美日韩视频二区| 国产精品视频自拍| 欧美在线三区| 在线播放日韩欧美| 欧美国产精品v| 一区二区三区蜜桃网| 国产精品私拍pans大尺度在线| 亚洲欧美日韩精品| 狠久久av成人天堂| 欧美高清视频一区二区| 中国av一区| 国产日韩在线看| 欧美电影电视剧在线观看| 一区二区三区四区五区精品视频| 国产精品久久久亚洲一区 | 欧美性猛交xxxx乱大交退制版| 在线一区日本视频| 国产视频一区二区三区在线观看| 久久天堂成人| 亚洲无玛一区| 精品成人一区二区| 国产精品黄色| 麻豆9191精品国产| 亚洲一区国产精品| 在线日韩一区二区| 国产精品女主播一区二区三区| 久久中文在线| 欧美一区2区三区4区公司二百 | 亚洲精品日韩激情在线电影| 国产精品丝袜久久久久久app| 狂野欧美一区| 篠田优中文在线播放第一区| 亚洲成人自拍视频| 国产精品欧美日韩一区二区| 欧美高清在线一区二区| 香蕉av777xxx色综合一区| 亚洲精品在线观| 尤物yw午夜国产精品视频| 欧美视频国产精品| 你懂的国产精品永久在线| 欧美一区国产二区| 一区二区精品在线| 亚洲第一视频| 狠狠色丁香婷婷综合| 国产精品入口夜色视频大尺度| 欧美aaaaaaaa牛牛影院| 欧美在线亚洲| 亚洲欧美第一页| 亚洲一级黄色| 中文有码久久| 在线中文字幕一区| 一本久久综合亚洲鲁鲁| 日韩午夜高潮| 亚洲精品美女| 亚洲免费观看| 一本久久知道综合久久| 9国产精品视频| 日韩视频免费| 一区二区三区四区国产| 亚洲精品影视| 亚洲久久一区| 日韩午夜电影| 亚洲性图久久| 亚洲综合好骚| 午夜精品av| 欧美在线视频日韩| 久久精品国产一区二区三区免费看| 午夜精品久久久久| 久久精品免费| 老司机aⅴ在线精品导航| 久久五月激情| 欧美激情aⅴ一区二区三区| 欧美激情亚洲视频| 欧美午夜在线观看| 国产麻豆综合| 一区二区在线观看av| 91久久国产综合久久91精品网站| 亚洲日韩欧美视频一区| 日韩午夜在线观看视频| 亚洲网址在线| 久久久久久久久久久久久久一区| 久久综合九九| 欧美三级电影大全| 国产一区99| 亚洲精品三级| 午夜精品美女久久久久av福利| 久久久精品国产免大香伊| 欧美成在线观看| 国产精品实拍| 亚洲电影在线免费观看| 夜夜嗨av一区二区三区四区 | 久久天天躁夜夜躁狠狠躁2022| 欧美成人激情视频免费观看| 国产精品白丝jk黑袜喷水| 国产一区二区按摩在线观看| 亚洲精品国精品久久99热一| 亚洲一区二区视频在线| 久久久久国产成人精品亚洲午夜| 欧美高清影院| 国产三级精品三级| 91久久国产综合久久| 亚洲制服av| 欧美成人午夜免费视在线看片| 国产精品日韩久久久| 亚洲国产视频一区| 午夜日韩视频| 欧美日韩免费视频| 黄色成人免费观看| 亚洲欧美精品伊人久久| 欧美不卡在线视频| 国产欧美日韩一区| 一区二区三区av| 欧美电影免费观看网站| 国产亚洲人成网站在线观看| 99亚洲视频| 欧美顶级大胆免费视频| 国产一二精品视频| 一区二区三区视频免费在线观看| 美日韩精品视频| 国模精品娜娜一二三区| 亚洲自拍都市欧美小说| 欧美日韩1区2区| 亚洲大胆视频| 久久精品盗摄| 国产麻豆成人精品| 亚洲午夜一区二区| 欧美日韩国产123区| 亚洲高清不卡在线| 久久视频免费观看| 韩国一区二区三区美女美女秀| 午夜视频一区| 国产深夜精品|