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

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

COMP9021代做、代寫python設計程序

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



COMP**21 Principles of Programming 
Term 2, 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. Although it is not needed for this quiz, you may import 
any extra module that is already installed in Ed if you wish. 
The program randomly generates a grid with 0s and 1s, whose dimension is controlled by user input, as 
well as the density of 1s in the grid, and finds out for a given step_number ≥ 1 and a given step_size ≥ 2, 
the number of stairs of step_number many steps, with all steps of size step_size. 
A stair of 1 step of size 2 is of the form: 
1 1 
 1 1 
A stair of 2 steps of size 2 is of the form 
1 1 
 1 1 
 1 1 
A stair of 1 step of size 3 is of the form 
1 1 1 
 1 
 1 1 1 
A stair of 2 steps of size 3 is of the form 
1 1 1 
 1 
 1 1 1 
 1 
 1 1 1 
 2 
 
 
The output lists the number of stairs from smallest step sizes to largest step sizes, and for a given step size, 
from stairs with the smallest number of steps to stairs with the largest number of stairs. 
Your task is to implement the function called stairs_in_grid(). 
You may possibly define other functions. 
The provided stub and the outputs of the sample test cases explain the task to be performed. 
 
Marking 
 stairs_in_grid() 4 marks 
 ------------------------------------ 
 Total 4 marks 
 
 
Due Date and Submission 
Quiz 5 is due Week 8 Thursday 18 July 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 8 Sunday 21 July 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. 
 
 3 
 
 
Test Cases 
 
$ python quiz_5.py 
Enter three positive integers: 0 1 2 
Here is the grid that has been generated: 
 1 1 
 0 1 
 
 
$ python quiz_5.py 
Enter three positive integers: 0 1 3 
Here is the grid that has been generated: 
 1 1 0 
 1 1 1 
 1 1 1 
 
For steps of size 2, we have: 
 2 stairs with 1 step 
 
 
$ python quiz_5.py 
Enter three positive integers: 0 3 9 
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 
 
For steps of size 2, we have: 
 5 stairs with 1 step 
 1 stair with 2 steps 
 1 stair with 3 steps 
 1 stair with 4 steps 
 
For steps of size 3, we have: 
 4 stairs with 1 step 
 
 4 
 
 
$ python quiz_5.py 
Enter three positive integers: 0 3 7 
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 
 
For steps of size 2, we have: 
 2 stairs with 1 step 
 2 stairs with 2 steps 
 
For steps of size 3, we have: 
 1 stair with 2 steps 
 
 
$ python quiz_5.py 
Enter three positive integers: 0 4 8 
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 
 
For steps of size 2, we have: 
 7 stairs with 1 step 
 3 stairs with 2 steps 
 2 stairs with 3 steps 
 
For steps of size 3, we have: 
 2 stairs with 1 step 
 1 stair with 2 steps 
 
For steps of size 4, we have: 
 1 stair with 1 step 
 
 5 
 
 
$ python quiz_5.py 
Enter three positive integers: 0 5 9 
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 1 0 1 0 
 1 1 1 1 0 1 1 1 1 
 1 1 1 1 1 1 1 0 1 
 0 0 1 1 1 1 1 0 1 
 1 1 1 1 1 1 0 1 1 
 1 1 1 1 1 0 0 1 1 
 1 0 1 1 1 1 0 1 1 
 
For steps of size 2, we have: 
 4 stairs with 1 step 
 5 stairs with 2 steps 
 1 stair with 3 steps 
 2 stairs with 4 steps 
 
For steps of size 3, we have: 
 9 stairs with 1 step 
 
For steps of size 4, we have: 
 2 stairs with 1 step 
 
 
 6 
 
 
Some Test Cases Explained 
 
$ python quiz_5.py 
Enter three positive integers: 0 1 3 
Here is the grid that has been generated: 
 1 1 0 
 1 1 1 
 1 1 1 
 
For steps of size 2, we have: 
 2 stairs with 1 step 
$ python quiz_5.py 
Enter three positive integers: 0 3 9 
Here is the grid that has been generated: 

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




 

掃一掃在手機打開當前頁
  • 上一篇:菲律賓落地簽和旅游簽長什么樣 圖片樣式介紹
  • 下一篇:COMP9414代做、代寫Python程序設計
  • ·COMP9021代做、代寫Python設計程序
  • 合肥生活資訊

    合肥圖文信息
    有限元分析 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>
        欧美激情日韩| 一本久久青青| 久久久蜜臀国产一区二区| 国产精品久久久久久久电影| 国产精品久久久久av免费| 在线不卡视频| 久久精品国产亚洲一区二区| 毛片一区二区三区| 国产精品高精视频免费| 亚洲校园激情| 欧美一区三区二区在线观看| 亚洲女性喷水在线观看一区| 国产亚洲午夜高清国产拍精品| 国产一区二区主播在线| 亚洲欧美日韩天堂一区二区| 亚洲伦理网站| 一区二区亚洲欧洲国产日韩| 久久久精品国产一区二区三区| 韩国亚洲精品| 国产精品久久久久久久久搜平片| 欧美中文字幕视频| 亚洲在线免费观看| 亚洲精品中文字幕在线| 午夜在线观看欧美| 久久琪琪电影院| 狠色狠色综合久久| 国产欧美婷婷中文| 国产欧美日韩中文字幕在线| 国产日韩欧美中文| 一本色道久久综合亚洲二区三区| 国产欧美在线观看一区| 亚洲性感美女99在线| 国产拍揄自揄精品视频麻豆| 久久午夜电影| 在线一区二区日韩| 国产日产亚洲精品| 日韩午夜在线观看视频| 亚洲人成网站999久久久综合| 欧美日韩大片| 欧美a级片网| 国产精品影视天天线| 国产精品久久久久久久久免费桃花| 亚洲乱码国产乱码精品精天堂| 欧美激情亚洲综合一区| 国产无遮挡一区二区三区毛片日本| 亚洲成人在线观看视频| 一本一本久久a久久精品牛牛影视| 亚洲精品免费一区二区三区| 欧美系列亚洲系列| 亚洲人体大胆视频| 欧美日韩国产精品一区| 亚洲免费电影在线| 免费成人小视频| 欧美视频在线观看 亚洲欧| 午夜精品久久久久久久白皮肤| 欧美在线在线| 午夜精品一区二区三区电影天堂| 日韩视频在线观看| 国产精品网站在线观看| 午夜精品亚洲一区二区三区嫩草| 午夜精品影院在线观看| 国产区精品在线观看| 亚洲毛片在线观看| 国产精品无码永久免费888| 久久久蜜臀国产一区二区| 亚洲少妇一区| 亚洲欧美视频在线观看视频| 国产亚洲欧美日韩精品| 亚洲一区欧美一区| 国产精品视频yy9299一区| 欧美激情麻豆| 欧美激情va永久在线播放| 99天天综合性| 亚洲天堂免费观看| 欧美大片91| 免费视频亚洲| 1024亚洲| 亚洲高清在线| 久久噜噜噜精品国产亚洲综合| 亚洲狼人综合| 欧美经典一区二区三区| 在线观看日韩av| 欧美黄色一区二区| 亚洲男人的天堂在线aⅴ视频| 欧美一区二区三区视频免费| 亚洲综合精品自拍| 欧美精品国产一区| 国产精品久久午夜夜伦鲁鲁| 亚洲成人影音| 日韩午夜中文字幕| 久久久精品性| 性欧美超级视频| 国产日韩亚洲欧美综合| 久久精品日韩| 欧美日韩视频在线第一区| 日韩视频免费观看高清在线视频| 欧美区一区二| 久久人人爽人人| 国产精品婷婷| 欧美区一区二区三区| 麻豆精品视频在线观看| 久久疯狂做爰流白浆xx| 一区二区三区黄色| 亚洲一区在线观看视频| 在线观看精品| 亚洲国产日韩在线| 国产精品扒开腿爽爽爽视频| 欧美日韩一区高清| 久久婷婷蜜乳一本欲蜜臀| 亚洲字幕一区二区| 欧美久久久久久久| 亚洲欧美中日韩| 一区二区免费在线播放| 欧美色欧美亚洲另类七区| 国产伦精品一区| 亚洲视频999| 亚洲第一黄网| 亚洲国产天堂久久国产91| 欧美精品123区| 欧美国产免费| 亚洲人永久免费| 国产精品国产a级| 另类人畜视频在线| 日韩视频不卡中文| 欧美日韩一区二区在线| 国产精品综合久久久| 欧美激情精品久久久六区热门| 亚洲无线视频| 欧美国产专区| 亚洲视屏在线播放| 国产一区在线观看视频| 亚洲风情亚aⅴ在线发布| 午夜精品一区二区在线观看| 亚洲欧美日韩综合一区| 久久国产一区| 国产无遮挡一区二区三区毛片日本| 国产精品高潮呻吟久久av无限| 欧美激情久久久| 日韩一级黄色大片| 欧美大成色www永久网站婷| 欧美亚洲视频在线看网址| 久久精品理论片| 欧美激情女人20p| 国产精品毛片一区二区三区| 国产精品网红福利| 亚洲精品影视| 亚洲国产另类精品专区| 亚洲一区精品在线| 国产欧美视频一区二区| 黄色一区二区三区四区| 国产麻豆精品在线观看| 免费成人小视频| av成人动漫| 欧美在线3区| 一区二区三区欧美在线| 中文日韩在线视频| 久久精品国产欧美亚洲人人爽| 欧美精品在线一区二区| 国产精品久久久久9999高清| 校园春色综合网| 欧美精品电影在线| 欧美另类久久久品| 欧美深夜影院| 在线成人免费视频|