合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

        代做INT2067、Python編程設(shè)計(jì)代寫
        代做INT2067、Python編程設(shè)計(jì)代寫

        時(shí)間:2024-11-08  來(lái)源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



        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. 

        請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp





         

        掃一掃在手機(jī)打開當(dāng)前頁(yè)
      1. 上一篇:代寫Neural Networks for Image 編程
      2. 下一篇:SCC.369代做、代寫C/C++編程設(shè)計(jì)
      3. 無(wú)相關(guān)信息
        合肥生活資訊

        合肥圖文信息
        挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
        挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
        戴納斯帝壁掛爐全國(guó)售后服務(wù)電話24小時(shí)官網(wǎng)400(全國(guó)服務(wù)熱線)
        戴納斯帝壁掛爐全國(guó)售后服務(wù)電話24小時(shí)官網(wǎng)
        菲斯曼壁掛爐全國(guó)統(tǒng)一400售后維修服務(wù)電話24小時(shí)服務(wù)熱線
        菲斯曼壁掛爐全國(guó)統(tǒng)一400售后維修服務(wù)電話2
        美的熱水器售后服務(wù)技術(shù)咨詢電話全國(guó)24小時(shí)客服熱線
        美的熱水器售后服務(wù)技術(shù)咨詢電話全國(guó)24小時(shí)
        海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
        海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
        合肥機(jī)場(chǎng)巴士4號(hào)線
        合肥機(jī)場(chǎng)巴士4號(hào)線
        合肥機(jī)場(chǎng)巴士3號(hào)線
        合肥機(jī)場(chǎng)巴士3號(hào)線
        合肥機(jī)場(chǎng)巴士2號(hào)線
        合肥機(jī)場(chǎng)巴士2號(hào)線
      4. 幣安app官網(wǎng)下載 短信驗(yàn)證碼 丁香花影院

        關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

        Copyright © 2024 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
        ICP備06013414號(hào)-3 公安備 42010502001045

        主站蜘蛛池模板: 日韩精品一区二区三区中文版| 亚洲国产精品一区二区第四页| 爆乳无码AV一区二区三区| 国产免费一区二区三区VR| 精品视频一区二区三区免费| 国语对白一区二区三区| 国产午夜三级一区二区三| 无码日韩AV一区二区三区| 日韩中文字幕一区| 日韩人妻不卡一区二区三区 | 国精产品一区一区三区MBA下载| 中文字幕一区二区三区在线播放| 国产一区视频在线免费观看| 亚洲乱码一区二区三区国产精品 | 国产亚洲情侣一区二区无码AV| 亚洲国产精品一区二区久久| 国产无码一区二区在线| 色视频综合无码一区二区三区| 亚洲一本一道一区二区三区| 亚洲AV无码一区二区三区人| 国精品无码一区二区三区在线| 区三区激情福利综合中文字幕在线一区| 亚洲熟女综合色一区二区三区| 国产精品一级香蕉一区| 中文字幕av人妻少妇一区二区 | 亚洲综合av永久无码精品一区二区| 波多野结衣中文字幕一区| 国产一区二区三区免费视频| 国产一区二区三区四| 香蕉在线精品一区二区| 国产精品一区三区| 成人午夜视频精品一区| 国产一区二区三区在线看| 亚洲图片一区二区| 亚洲爆乳精品无码一区二区| 国模精品视频一区二区三区| 午夜肉伦伦影院久久精品免费看国产一区二区三区 | 免费播放一区二区三区| 精品无码av一区二区三区| 国产福利一区二区三区| 国产精品一区二区在线观看|