COMP9021讲解、辅导python语言、讲解python编程设计、讲解data 辅导Database|辅导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:
['~', '!', '*', '@', '&', '^']
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...
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:
['~', '!', '*', '@', '&', '^']
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...