联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Python编程Python编程

日期:2021-06-11 10:56

QUIZ 1

COMP9021 PRINCIPLES OF PROGRAMMING

$ python3 quiz_1.py

Enter two integers, the second one being strictly positive: 0 1

Here are the generated widths:

[7]

Here are the generated symbols:

['&']

Here are the generated repetitions:

[1]

Here is the input as a pattern:

7&1

Here is the input as a dictionary:

(7, 1): '&'

Here is the input as an amazing picture:

|&&&&&&&|

$ python3 quiz_1.py

Enter two integers, the second one being strictly positive: 10 2

Here are the generated widths:

[1, 1]

Here are the generated symbols:

['&', '$']

Here are the generated repetitions:

[8, 8]

Here is the input as a pattern:

1&81$8

Due to identical pairs of numbers, the input cannot be represented as a dictionary.

Here is the input as an amazing picture:

|&|&|&|&|&|&|&|&|

|$|$|$|$|$|$|$|$|

Date: Trimester 2, 2021.

2 COMP9021 PRINCIPLES OF PROGRAMMING

$ python3 quiz_1.py

Enter two integers, the second one being strictly positive: 20 3

Here are the generated widths:

[3, 6, 1]

Here are the generated symbols:

['%', '+', '&']

Here are the generated repetitions:

[2, 3, 7]

Here is the input as a pattern:

3%26+31&7

Here is the input as a dictionary:

(3, 2): '%', (6, 3): '+', (1, 7): '&'

Here is the input as an amazing picture:

|%%%|%%%|

|++++++|++++++|++++++|

|&|&|&|&|&|&|&|

$ python3 quiz_1.py

Enter two integers, the second one being strictly positive: 50 4

Here are the generated widths:

[8, 4, 2, 4]

Here are the generated symbols:

['%', '*', '-', '-']

Here are the generated repetitions:

[6, 6, 6, 2]

Here is the input as a pattern:

8%64*62-64-2

Here is the input as a dictionary:

(8, 6): '%', (4, 6): '*', (2, 6): '-', (4, 2): '-'

Here is the input as an amazing picture:

|%%%%%%%%|%%%%%%%%|%%%%%%%%|%%%%%%%%|%%%%%%%%|%%%%%%%%|

|****|****|****|****|****|****|

|--|--|--|--|--|--|

|----|----|

QUIZ 1 3

$ python3 quiz_1.py

Enter two integers, the second one being strictly positive: 100 5

Here are the generated widths:

[3, 3, 7, 9, 8]

Here are the generated symbols:

['*', '&', '-', '@', '%']

Here are the generated repetitions:

[8, 6, 2, 2, 1]

Here is the input as a pattern:

3*83&67-29@28%1

Here is the input as a dictionary:

(3, 8): '*', (3, 6): '&', (7, 2): '-', (9, 2): '@', (8, 1): '%'

Here is the input as an amazing picture:

4 COMP9021 PRINCIPLES OF PROGRAMMING

$ python3 quiz_1.py

Enter two integers, the second one being strictly positive: 200 10

Here are the generated widths:

[1, 3, 1, 1, 8, 4, 7, 8, 8, 3]

Here are the generated symbols:

['$', '+', '*', '*', '*', '@', '^', '&', '%', '#']

Here are the generated repetitions:

[1, 5, 3, 5, 4, 5, 2, 4, 2, 8]

Here is the input as a pattern:

1$13+51*31*58*44@57^28&48%23#8

Due to identical pairs of numbers, the input cannot be represented as a dictionary.

Here is the input as an amazing picture:


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp