合肥生活安徽新闻合肥交通合肥房产生活服务合肥教育合肥招聘合肥旅游文化艺术合肥美食合肥地图合肥社保合肥医院企业服务合肥法律

代写COMP9021、代做python编程设计

时间:2024-06-28  来源:合肥网hfw.cc  作者:hfw.cc 我要纠错



COMP9021 Principles of Programming
Term 2, 2024
Coding Quiz 3
Worth 4 marks and due Week 5 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 module that is already installed in Ed if you wish.
The current code prompts the user for a positive integer.
This positive integer, when written in base 3, its consecutive digits read from left to right represent the
directions to take, with:
 0 meaning going South (S),
 1 meaning going South West (SW), and
 2 meaning going South East (SE).
Your task is to print out:
1. the representation of the integer in base 3,
2. the corresponding sequence of directions to take as arrows, and
3. the sequence of arrows again, but nicely displayed.
The leftmost arrow is printed out with no space to the left.
The arrows are the Unicode characters of code point:
Use, for instance, print('\u2b07') to display ?.
The provided stub and the outputs of the sample test cases explain the task to be performed.
2
Marking
Representation of the integer in base 3 1.25 marks
Corresponding sequence of arrows 1.25 marks
Sequence of arrows nicely displayed 1.50 marks
------------------------------------------------------------------------
Total 4.00 marks
Due Date and Submission
Quiz 3 is due Week 5 Thursday 27 June 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 5 Sunday 30 June 2024 @ 9pm will be discarded.
Make sure not to change the filename quiz_3.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 3.
Test Cases
$ python quiz_3.py
Enter a positive integer: 0
In base 3, the input reads as: 0
So that's how you want to go: 
Let's go then!

$ python quiz_3.py
Enter a positive integer: 9
In base 3, the input reads as: 100
So that's how you want to go: 
Let's go then!
$ python quiz_3.py
Enter a positive integer: 17
In base 3, the input reads as: 122
So that's how you want to go: 
Let's go then!
$ python quiz_3.py
Enter a positive integer: 35
In base 3, the input reads as: 1022
So that's how you want to go: 
Let's go then!
$ python quiz_3.py
Enter a positive integer: 123456789
In base 3, the input reads as: 22121022020212200
So that's how you want to go: Let's go then!
$ python quiz_3.py
Enter a positive integer: 9876543210
In base 3, the input reads as: 221111022110101020200
So that's how you want to go: 
Let's go then!

请加QQ:99515681  邮箱:99515681@qq.com   WX:codinghelp





 

扫一扫在手机打开当前页
  • 上一篇:代写CS6250程序、代做python编程设计
  • 下一篇:特好清尾货网,您的库存尾货批发与收购最佳选择!
  • 无相关信息
    合肥生活资讯

    合肥图文信息
    海信罗马假日洗衣机亮相AWE  复古美学与现代科技完美结合
    海信罗马假日洗衣机亮相AWE 复古美学与现代
    合肥机场巴士4号线
    合肥机场巴士4号线
    合肥机场巴士3号线
    合肥机场巴士3号线
    合肥机场巴士2号线
    合肥机场巴士2号线
    合肥机场巴士1号线
    合肥机场巴士1号线
    合肥轨道交通线路图
    合肥轨道交通线路图
    合肥地铁5号线 运营时刻表
    合肥地铁5号线 运营时刻表
    合肥地铁4号线 运营时刻表
    合肥地铁4号线 运营时刻表
  • 关于我们 | 打赏支持 | 广告服务 | 联系我们 | 网站地图 | 免责声明 | 帮助中心 | 友情链接 |

    Copyright © 2024 hfw.cc Inc. All Rights Reserved. 合肥网 版权所有
    ICP备06013414号-3 公安备 42010502001045