COMP9021编程讲解、辅导python语言编程

- 首页 >> Java编程
QUIZ 1
COMP9021 PRINCIPLES OF PROGRAMMING
$ python3 quiz_1.py
Enter two integers, the second one being between 1 and 10 included: 1 8
Here is the list of symbols:
['@', '!', '$', '~', '#', '%', '&', '+']
Here is the list of how many times each of them is to be displayed:
[7, 4, 2, 8, 1, 7, 7, 1]
What is your favourite symbol? #
How big do you want the gap to be (should be 1 or more)? 4
What is the name of the file containing the instructions? instructions_1.txt
I have a drawing for you...
It is made of #, repeated once,
placed in the four corners of a rectangle,
with a gap of 4 both horizontally and vertically.
# #
# #
Like it?
I am now going to process the instructions in the file.
**********
____
+++++
Ok, but not a great drawing...
Date: Trimester 2, 2020.
2 COMP9021 PRINCIPLES OF PROGRAMMING
$ python3 quiz_1.py
Enter two integers, the second one being between 1 and 10 included: 2 6
Here is the list of symbols:
['~', '!', '*', '@', '&', '^']
COMP9021作业代做、代写python语言作业
Here is the list of how many times each of them is to be displayed:
[5, 4, 1, 3, 7, 7]
What is your favourite symbol? ^
How big do you want the gap to be (should be 1 or more)? 1
What is the name of the file containing the instructions? instructions_2.txt
I have a drawing for you...
It is made of ^, repeated 7 times,
placed in the four corners of a rectangle,
with a gap of 1 both horizontally and vertically.
^^^^^^^ ^^^^^^^
^^^^^^^ ^^^^^^^
Like it?
I am now going to process the instructions in the file.
^^^
%%%%%
++++++++
++++
==
Ok, but not a great drawing...
QUIZ 1 3
$ python3 quiz_1.py
Enter two integers, the second one being between 1 and 10 included: 6 10
Here is the list of symbols:
['+', '!', '&', '^', '@', '~', '$', '#', '*', '%']
Here is the list of how many times each of them is to be displayed:
[6, 1, 5, 8, 4, 7, 9, 9, 2, 4]
What is your favourite symbol? $
How big do you want the gap to be (should be 1 or more)? 5
What is the name of the file containing the instructions? some_instructions.txt
I have a drawing for you...
It is made of $, repeated 9 times,
placed in the four corners of a rectangle,
with a gap of 5 both horizontally and vertically.
$$$$$$$$$ $$$$$$$$$
$$$$$$$$$ $$$$$$$$$
Like it?
I am now going to process the instructions in the file.
***********************
((((((((
&&&&&&
)))))))))))))))))
+
**************
###
$$$
%%%%
Ok, but not a great drawing...

如有需要,请加QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp
站长地图