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

        代做COMP9021、代寫Python設計編程

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



        COMP**21 Principles of Programming
        Term 1, 2024
        Coding Quiz 5
        Worth 4 marks and due Week 8 Thursday @ 9pm
        Description
        You are provided with a stub in which you need to insert your code where indicated without doing
        any changes to the existing code to complete the task.
        Given the value of seed and density, the provided code randomly fills an array (or grid) of size
        10 x 10 with 0s and 1s. Your task is to determine and output the size of the largest parallelogram
        with horizontal sides. A parallelogram consists of a line with at least 2 consecutive 1s, with below
        at least one line with the same number of consecutive 1s, all those lines being aligned vertically in
        which case the parallelogram is actually a rectangle, for instance:
        1 1 1
        1 1 1
        1 1 1
        1 1 1
        or consecutive lines move to the left by one position, for instance:
         1 1 1
         1 1 1
         1 1 1
        1 1 1
        or consecutive lines move to the right by one position, e.g.
        1 1 1
         1 1 1
         1 1 1
         1 1 1
        The size is the number of 1s in the parallelogram. In the above examples, the size is 12.
        See test cases below for more examples.
        2
        Due Date and Submission
        Quiz 5 is due Week 8 Thursday 4 April 2024 @ 9.00pm (Sydney time).
        Note that late submission with 5% penalty per day is allowed up to 3 days from the due date, that
        is, any late submission after Week 7 Sunday 7 April 2024 @ 9pm will be discarded.
        Make sure not to change the filename quiz_5.py while submitting by clicking on [Mark] button
        in Ed. It is your responsibility to check that your submission did go through properly using
        Submissions link in Ed otherwise your mark will be zero for Quiz 5.
        Test Cases
        $ python3 quiz_5.py
        Enter two integers, the second one being strictly positive: 0 1
        Here is the grid that has been generated:
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        There is no parallelogram with horizontal sides.
        $ python3 quiz_5.py
        Enter two integers, the second one being strictly positive: 0 2
        Here is the grid that has been generated:
        1 1 0 1 1 1 1 1 1 0
        0 1 0 0 1 0 1 0 0 1
        1 0 1 1 1 0 1 1 1 0
        0 0 1 0 1 1 0 1 0 0
        0 0 0 1 0 0 1 1 0 1
        1 0 1 0 1 1 0 1 1 0
        1 0 0 0 0 1 1 0 0 0
        0 0 0 1 1 0 0 1 1 1
        1 1 0 1 0 1 1 0 0 0
        1 0 0 1 0 1 1 0 0 0
        The largest parallelogram with horizontal sides has a size of 4.
        3
        $ python3 quiz_5.py
        Enter two integers, the second one being strictly positive: 0 3
        Here is the grid that has been generated:
        1 1 0 1 1 1 1 1 1 1
        1 0 1 0 1 0 0 1 1 1
        1 1 0 1 0 1 0 1 1 1
        1 0 1 1 1 1 1 0 1 1
        1 1 1 0 1 0 0 1 1 1
        1 1 0 1 1 1 0 1 1 1
        0 0 1 0 0 0 1 1 0 0
        1 1 1 0 1 1 1 1 0 1
        1 1 0 1 1 1 1 1 0 1
        1 1 1 0 1 0 0 0 0 1
        The largest parallelogram with horizontal sides has a size of 12.
        $ python3 quiz_5.py
        Enter two integers, the second one being strictly positive: 0 4
        Here is the grid that has been generated:
        1 1 0 1 1 1 1 1 1 1
        1 1 1 0 1 1 1 0 0 1
        1 0 1 1 1 1 1 1 1 0
        0 0 1 0 1 1 1 1 0 1
        1 1 1 1 0 0 1 1 0 1
        1 0 1 1 1 1 0 1 1 1
        1 1 1 1 0 1 1 0 0 1
        1 0 0 1 1 1 1 1 1 1
        1 1 0 1 0 1 1 1 1 0
        1 0 1 1 1 1 1 0 0 1
        The largest parallelogram with horizontal sides has a size of 12.
        4
        $ python3 quiz_5.py
        Enter two integers, the second one being strictly positive: 1 4
        Here is the grid that has been generated:
        1 0 1 0 1 1 1 1 1 0
        1 0 1 1 0 1 1 1 0 1
        0 0 0 0 1 1 1 0 1 1
        1 1 1 1 1 1 1 0 1 0
        1 1 0 1 1 1 1 1 1 1
        0 1 1 1 1 1 1 1 0 1
        0 1 1 1 1 0 1 0 1 1
        1 1 1 0 1 1 1 1 1 1
        1 0 1 1 1 1 0 1 1 1
        1 1 1 1 1 0 1 1 0 1
        The largest parallelogram with horizontal sides has a size of 16.
        $ python3 quiz_5.py
        Enter two integers, the second one being strictly positive: 0 5
        Here is the grid that has been generated:
        1 1 0 1 1 1 1 1 1 1
        1 1 1 1 1 1 0 1 1 1
        1 1 1 0 0 1 1 1 0 1
        1 1 1 1 1 1 1 1 1 0
        1 0 0 1 0 1 1 1 1 1
        0 1 1 1 1 1 1 1 0 0
        1 1 1 0 1 1 1 0 1 1
        1 1 1 1 1 1 1 0 1 1
        1 1 1 1 1 1 1 0 1 1
        1 0 0 1 1 0 0 1 1 1
        The largest parallelogram with horizontal sides has a size of 15.
        5
        Test Cases Explained
        $ python3 quiz_5.py
        Enter two integers, the second one being strictly positive: 0 1
        Here is the grid that has been generated:
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        0 0 0 0 0 0 0 0 0 0
        There is no parallelogram with horizontal sides.
        $ python3 quiz_5.py
        Enter two integers, the second one being strictly positive: 0 2
        Here is the grid that has been generated:
        1 1 0 1 1 1 1 1 1 0
        0 1 0 0 1 0 1 0 0 1
        1 0 1 1 1 0 1 1 1 0
        0 0 1 0 1 1 0 1 0 0
        0 0 0 1 0 0 1 1 0 1
        1 0 1 0 1 1 0 1 1 0
        1 0 0 0 0 1 1 0 0 0
        0 0 0 1 1 0 0 1 1 1
        1 1 0 1 0 1 1 0 0 0
        1 0 0 1 0 1 1 0 0 0
        The largest parallelogram with horizontal sides has a size of 4.
        6
        $ python3 quiz_5.py
        Enter two integers, the second one being strictly positive: 0 3
        Here is the grid that has been generated:
        1 1 0 1 1 1 1 1 1 1
        1 0 1 0 1 0 0 1 1 1
        1 1 0 1 0 1 0 1 1 1
        1 0 1 1 1 1 1 0 1 1
        1 1 1 0 1 0 0 1 1 1
        1 1 0 1 1 1 0 1 1 1
        0 0 1 0 0 0 1 1 0 0
        1 1 1 0 1 1 1 1 0 1
        1 1 0 1 1 1 1 1 0 1
        1 1 1 0 1 0 0 0 0 1
        The largest parallelogram with horizontal sides has a size of 12.
        $ python3 quiz_5.py
        Enter two integers, the second one being strictly positive: 0 4
        Here is the grid that has been generated:
        1 1 0 1 1 1 1 1 1 1
        1 1 1 0 1 1 1 0 0 1
        1 0 1 1 1 1 1 1 1 0
        0 0 1 0 1 1 1 1 0 1
        1 1 1 1 0 0 1 1 0 1
        1 0 1 1 1 1 0 1 1 1
        1 1 1 1 0 1 1 0 0 1
        1 0 0 1 1 1 1 1 1 1
        1 1 0 1 0 1 1 1 1 0
        1 0 1 1 1 1 1 0 0 1
        The largest parallelogram with horizontal sides has a size of 12.
        7
        $ python3 quiz_5.py
        Enter two integers, the second one being strictly positive: 1 4
        Here is the grid that has been generated:
        1 0 1 0 1 1 1 1 1 0
        1 0 1 1 0 1 1 1 0 1
        0 0 0 0 1 1 1 0 1 1
        1 1 1 1 1 1 1 0 1 0
        1 1 0 1 1 1 1 1 1 1
        0 1 1 1 1 1 1 1 0 1
        0 1 1 1 1 0 1 0 1 1
        1 1 1 0 1 1 1 1 1 1
        1 0 1 1 1 1 0 1 1 1
        1 1 1 1 1 0 1 1 0 1
        The largest parallelogram with horizontal sides has a size of 16.
        $ python3 quiz_5.py
        Enter two integers, the second one being strictly positive: 0 5
        Here is the grid that has been generated:
        1 1 0 1 1 1 1 1 1 1
        1 1 1 1 1 1 0 1 1 1
        1 1 1 0 0 1 1 1 0 1
        1 1 1 1 1 1 1 1 1 0
        1 0 0 1 0 1 1 1 1 1
        0 1 1 1 1 1 1 1 0 0
        1 1 1 0 1 1 1 0 1 1
        1 1 1 1 1 1 1 0 1 1
        1 1 1 1 1 1 1 0 1 1
        1 0 0 1 1 0 0 1 1 1
        The largest parallelogram with horizontal sides has a size of 15.

        請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp

        掃一掃在手機打開當前頁
      1. 上一篇:越南S2結婚簽證費用是多少(S2簽證是什么)
      2. 下一篇:學生簽入境菲律賓條件(學生簽申請指南)
      3. 無相關信息
        合肥生活資訊

        合肥圖文信息
        挖掘機濾芯提升發動機性能
        挖掘機濾芯提升發動機性能
        戴納斯帝壁掛爐全國售后服務電話24小時官網400(全國服務熱線)
        戴納斯帝壁掛爐全國售后服務電話24小時官網
        菲斯曼壁掛爐全國統一400售后維修服務電話24小時服務熱線
        菲斯曼壁掛爐全國統一400售后維修服務電話2
        美的熱水器售后服務技術咨詢電話全國24小時客服熱線
        美的熱水器售后服務技術咨詢電話全國24小時
        海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
        海信羅馬假日洗衣機亮相AWE 復古美學與現代
        合肥機場巴士4號線
        合肥機場巴士4號線
        合肥機場巴士3號線
        合肥機場巴士3號線
        合肥機場巴士2號線
        合肥機場巴士2號線
      4. 幣安app官網下載 短信驗證碼 丁香花影院

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

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

        主站蜘蛛池模板: 国产一区视频在线| 免费视频一区二区| 人妻互换精品一区二区| 久久久无码一区二区三区| 亚洲国产情侣一区二区三区| 亚洲精品伦理熟女国产一区二区| 免费看无码自慰一区二区| 人妻体内射精一区二区| 福利一区二区三区视频在线观看| 美女视频一区三区网站在线观看| 麻豆国产在线不卡一区二区| 日本夜爽爽一区二区三区| 国产精品区一区二区三在线播放| 国产精品一区二区久久精品涩爱| 免费视频精品一区二区| 日韩人妻不卡一区二区三区| 狠狠综合久久av一区二区| 亚洲乱码日产一区三区 | 毛片无码一区二区三区a片视频| 日韩在线一区二区三区视频| 亚洲色精品aⅴ一区区三区| 日韩一区二区三区射精| 波多野结衣AV无码久久一区| 国产一区二区三区乱码在线观看| 伊人色综合一区二区三区 | 成人区人妻精品一区二区三区| 国产天堂一区二区综合| 久久久无码精品人妻一区| 亚洲av无码一区二区三区不卡 | 精品伦精品一区二区三区视频| 日韩中文字幕一区| 日产一区日产2区| 黑人一区二区三区中文字幕| 麻豆果冻传媒2021精品传媒一区下载| 亚洲片一区二区三区| 激情久久av一区av二区av三区| 激情亚洲一区国产精品| 国产一区二区在线视频| 国产另类ts人妖一区二区三区| 国产一区二区影院| 在线免费观看一区二区三区|