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爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          亚洲免费在线精品一区| 日韩视频在线观看国产| 欧美成人午夜影院| 在线亚洲欧美专区二区| 国内精品视频在线观看| 欧美午夜无遮挡| 美日韩精品免费观看视频| 亚洲字幕一区二区| 亚洲免费成人av| 亚洲国产二区| 影音先锋日韩资源| 国产日韩欧美一二三区| 欧美午夜视频在线| 欧美日韩在线精品| 欧美激情综合亚洲一二区| 久久精品一区二区三区四区| 亚洲一区久久久| 亚洲午夜精品久久久久久浪潮| 亚洲欧洲精品一区二区精品久久久| 国产一本一道久久香蕉| 国产精品社区| 国产精品亚洲片夜色在线| 欧美日韩三级视频| 欧美日韩一区精品| 欧美三级午夜理伦三级中文幕| 欧美大胆a视频| 欧美激情一区二区三级高清视频| 狂野欧美性猛交xxxx巴西| 久久精品人人做人人爽电影蜜月| 欧美亚洲日本国产| 欧美一区二区三区四区在线观看地址 | 欧美日韩一区二区三区在线看| 农村妇女精品| 欧美激情精品久久久久久黑人| 蜜桃av久久久亚洲精品| 欧美大秀在线观看| 欧美日本不卡高清| 欧美性理论片在线观看片免费| 欧美日韩一区二区三区在线视频| 欧美色欧美亚洲另类七区| 国产精品国产三级国产aⅴ浪潮 | 一区二区三区偷拍| 亚洲综合社区| 欧美在线观看网址综合| 久久久久久久久一区二区| 免费不卡欧美自拍视频| 欧美日韩成人在线播放| 国产精品二区影院| 韩日精品视频| 99精品视频一区二区三区| 亚洲永久免费视频| 久久国产精品亚洲va麻豆| 久久中文字幕导航| 欧美午夜性色大片在线观看| 国产精品五区| 亚洲国产欧美久久| 中文高清一区| 麻豆国产精品va在线观看不卡| 欧美日韩亚洲一区二区三区在线| 国产精品亚洲а∨天堂免在线| 在线成人性视频| 亚洲香蕉成视频在线观看 | 久久精品国产综合精品| 欧美激情综合五月色丁香| 国产日韩欧美二区| 日韩亚洲一区在线播放| 久久精品女人的天堂av| 欧美精品日本| 黄网站免费久久| 亚洲性人人天天夜夜摸| 蜜桃伊人久久| 国产一区二区黄| 亚洲一区二区在| 欧美激情一区二区三区成人 | 欧美制服丝袜第一页| 欧美日韩午夜在线| 亚洲电影免费观看高清完整版在线| 宅男噜噜噜66一区二区66| 欧美va天堂| 国模叶桐国产精品一区| 亚洲综合日韩| 欧美日韩亚洲网| 亚洲精美视频| 美女福利精品视频| 尤物yw午夜国产精品视频明星| 一本久道久久综合婷婷鲸鱼| 亚洲伊人久久综合| 久久久久久久999精品视频| 欧美日韩视频专区在线播放 | 国产午夜亚洲精品理论片色戒| 99人久久精品视频最新地址| 免费成人高清视频| 影音先锋日韩精品| 久久精品国产99国产精品| 国产精品久久精品日日| 亚洲视频免费在线观看| 欧美视频成人| 亚洲主播在线播放| 国产精品久99| 久久超碰97中文字幕| 国产一区导航| 久久深夜福利| 亚洲韩国精品一区| 欧美精品在线看| 亚洲一本大道在线| 国产精品男女猛烈高潮激情| 亚洲综合日韩在线| 国产色产综合色产在线视频| 久久av一区二区| 永久域名在线精品| 你懂的视频一区二区| 亚洲激情小视频| 欧美亚洲成人网| 欧美伊人久久久久久久久影院 | 国产在线一区二区三区四区 | 亚洲人成在线观看一区二区| 欧美日本一区二区三区| 亚洲在线一区| 激情视频一区二区三区| 欧美激情小视频| 亚洲一区二区欧美| 韩国av一区二区三区在线观看| 免费成人av资源网| 亚洲深夜激情| 精品av久久久久电影| 欧美久久久久| 久久aⅴ乱码一区二区三区| 亚洲黄色av一区| 国产精品日韩精品欧美精品| 久久精品中文字幕免费mv| 亚洲精品国产精品国自产在线| 欧美色视频在线| 久久久夜色精品亚洲| 一区二区三区 在线观看视| 国产视频亚洲精品| 欧美日韩一区国产| 久久一区精品| 午夜精品视频在线观看一区二区| 亚洲国产中文字幕在线观看| 国产精品日韩在线播放| 欧美激情bt| 欧美一级电影久久| 一区二区三区国产| 亚洲激情六月丁香| 国产精一区二区三区| 欧美日韩国产二区| 蜜桃av综合| 午夜激情综合网| 99视频精品全国免费| 亚洲国产精品一区二区久| 国产亚洲一区在线播放| 国产精品扒开腿做爽爽爽软件| 农夫在线精品视频免费观看| 久久精品免视看| 性欧美video另类hd性玩具| 99re这里只有精品6| 亚洲黄色免费电影| 亚洲国产精品一区二区久| 激情久久久久久久| 国产日韩欧美在线视频观看| 欧美视频亚洲视频| 欧美日韩成人在线视频| 欧美福利视频网站| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美一区二区在线| 欧美在线网站| 欧美在线啊v| 久久久久欧美精品| 久久精品人人做人人综合| 欧美一区二区三区啪啪| 亚洲欧美日韩久久精品| 亚洲免费中文字幕| 午夜精品久久久久久久99黑人| 亚洲自拍三区| 久久av资源网站| 久久久久久久综合色一本| 久久久久一区二区| 免费中文字幕日韩欧美| 欧美成人免费网站| 欧美日韩成人激情| 国产精品国产成人国产三级| 国产精品超碰97尤物18| 国产视频欧美| 在线观看亚洲专区| 9i看片成人免费高清| 亚洲视频精品| 久久疯狂做爰流白浆xx| 欧美成人免费全部观看天天性色| 欧美激情综合色综合啪啪| 欧美日韩一区在线观看| 国产精品色婷婷| 国产一区二区精品在线观看| 亚洲国产高清高潮精品美女| 一本久久综合亚洲鲁鲁| 亚洲欧美日韩精品一区二区| 久久免费视频网站| 欧美婷婷久久| 在线看欧美视频| 亚洲一区视频在线| 久久综合999|