日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

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

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

    合肥圖文信息
    有限元分析 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>
        国产精品久久午夜| 国产在线播放一区二区三区| 亚洲欧洲综合另类在线| 欧美一区二区三区日韩| 欧美人与性动交α欧美精品济南到| 一区二区三区在线视频免费观看| 在线欧美一区| 亚洲人成网站影音先锋播放| 极品尤物一区二区三区| 国产日韩精品久久久| 久久久久久一区二区三区| 欧美涩涩视频| 99亚洲精品| 欧美激情综合网| 久久精品观看| 免费日本视频一区| 国产精品男女猛烈高潮激情| 亚洲午夜精品久久久久久浪潮| 日韩一区二区高清| 国产视频久久网| 国产精品视频yy9099| 最新国产成人在线观看| 欧美激情1区2区| 欧美在线精品一区| 国产精品综合不卡av| 伊人久久成人| 国产精品一区久久久| 久久成人精品一区二区三区| 亚洲欧美在线网| 国产精品一级在线| 黄色欧美成人| 久久久精品免费视频| 国产一区亚洲| 久久躁日日躁aaaaxxxx| 日韩视频免费| 狠色狠色综合久久| 欧美久久99| 亚洲国产精品成人一区二区| 欧美综合激情网| 久久精品欧美日韩| 一本到12不卡视频在线dvd| 在线视频日韩精品| 亚洲欧美三级在线| 国产精品久久久久aaaa| 美女精品在线| 国产综合视频在线观看| 久久精品91久久久久久再现| 欧美成人自拍视频| 亚洲视频在线免费观看| 久久野战av| 久久精品首页| 亚洲激情视频| 亚洲国产日韩欧美在线动漫| 亚洲乱亚洲高清| 美玉足脚交一区二区三区图片| 亚洲欧美日韩久久精品| 亚洲清纯自拍| 国产精品久久久久免费a∨大胸| 国产精品一区久久| 国产精品福利网站| 国语自产精品视频在线看抢先版结局| 亚洲日本一区二区三区| 亚洲大片在线观看| 国产一区免费视频| 久久久久久夜精品精品免费| 欧美人在线视频| 亚洲欧洲一区二区天堂久久| 亚洲欧洲在线视频| 欧美日韩免费高清| 欧美日韩国产一区| 国产亚洲欧美色| 亚洲欧美日本视频在线观看| 亚洲电影免费观看高清完整版| 欧美日韩黄视频| 亚洲伊人色欲综合网| 欧美日本国产视频| 欧美日韩一区三区| 激情六月婷婷综合| 欧美在线播放| 国产精品三区www17con| 亚洲欧美成人一区二区在线电影| 亚洲一区二三| 在线播放豆国产99亚洲| 欧美色播在线播放| 亚洲七七久久综合桃花剧情介绍| 亚洲精品一级| 国产日韩av一区二区| 伊人久久噜噜噜躁狠狠躁| 裸体素人女欧美日韩| 欧美日韩国产综合久久| 久久久亚洲国产天美传媒修理工| 欧美视频在线观看视频极品| 伊人久久av导航| 欧美理论大片| 亚洲一区免费| 91久久精品国产91久久| 亚洲欧美成人在线| 午夜精品久久久久久| 亚洲第一综合天堂另类专| 欧美日韩免费一区二区三区视频| 亚洲嫩草精品久久| 精东粉嫩av免费一区二区三区| 欧美精品一区二区三区在线播放| 亚洲女同精品视频| 久久久噜久噜久久综合| 巨胸喷奶水www久久久免费动漫| 亚洲福利专区| 中文在线资源观看视频网站免费不卡| 日韩视频免费大全中文字幕| 欧美日韩情趣电影| 欧美一区二区三区视频在线观看| 亚洲欧美中文日韩在线| 一区二区三区精密机械公司| 欧美性大战久久久久久久| 中国成人在线视频| 永久久久久久| 媚黑女一区二区| 激情欧美亚洲| 一区二区黄色| 亚洲开发第一视频在线播放| 国产一区二区精品久久99| 国内精品视频在线观看| 久久视频这里只有精品| 国精产品99永久一区一区| 欧美一区三区三区高中清蜜桃| 中文亚洲欧美| 国产精品99免视看9| 国产亚洲a∨片在线观看| 欧美精品免费视频| 亚洲国产成人精品视频| 国产精品嫩草影院av蜜臀| 久久久综合网| 亚洲女人小视频在线观看| 久久伊人免费视频| 亚洲综合国产精品| 亚洲国产精品一区二区www在线| 欧美精品18videos性欧美| 国产欧美日韩不卡| 国产亚洲欧美日韩美女| 亚洲欧洲在线观看| 欧美午夜精品理论片a级按摩| 午夜精品亚洲一区二区三区嫩草| 亚洲第一色中文字幕| 国产综合色一区二区三区| 欧美激情精品久久久久久蜜臀| 国产午夜精品久久久久久免费视| 国产精品豆花视频| 久久国产精品免费一区| 狠狠88综合久久久久综合网| 欧美日韩国产美| 一区二区久久| 久久久久久久久久久久久9999| 国产亚洲午夜高清国产拍精品| 亚洲第一视频网站| 欧美日韩在线观看一区二区| 久久久99精品免费观看不卡| 欧美日韩国产电影| 国产精品毛片一区二区三区| 黄色另类av| 欧美精品在欧美一区二区少妇| 久久精品在线观看| 一区在线观看视频| 欧美激情综合亚洲一二区| 国产午夜精品一区二区三区欧美|