Skip to content

Commit 43e09b8

Browse files
authored
edited line 580 to not confusingly reference tuple
the solution to 580 isn't reliant on tuples, and the input is not tuples, it's raw console input, so mentioning them is misleading.
1 parent 81b147a commit 43e09b8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

100+ Python challenging programming exercises.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Level 2
177177

178178
Question:
179179
Write a program which takes 2 digits, X,Y as input and generates a 2-dimensional array. The element value in the i-th row and j-th column of the array should be i*j.
180-
Note: i=0,1.., X-1; j=0,1,��Y-1.
180+
Note: i=0,1.., X-1; j=0,1,¡­Y-1.
181181
Example
182182
Suppose the following inputs are given to the program:
183183
3,5
@@ -225,7 +225,7 @@ print ','.join(items)
225225
Question 9
226226
Level 2
227227

228-
Question��
228+
Question£º
229229
Write a program that accepts sequence of lines as input and prints the lines after making all characters in the sentence capitalized.
230230
Suppose the following input is supplied to the program:
231231
Hello world
@@ -425,7 +425,7 @@ Question:
425425
Write a program that computes the net amount of a bank account based a transaction log from console input. The transaction log format is shown as following:
426426
D 100
427427
W 200
428-
��
428+
¡­
429429
D means deposit while W means withdrawal.
430430
Suppose the following input is supplied to the program:
431431
D 300
@@ -568,16 +568,16 @@ for i in reverse(100):
568568
Question 21
569569
Level 3
570570

571-
Question��
571+
Question£º
572572
A robot moves in a plane starting from the original point (0,0). The robot can move toward UP, DOWN, LEFT and RIGHT with a given steps. The trace of robot movement is shown as the following:
573573
UP 5
574574
DOWN 3
575575
LEFT 3
576576
RIGHT 2
577-
��
577+
¡­
578578
The numbers after the direction are steps. Please write a program to compute the distance from current position after a sequence of movement and original point. If the distance is a float, then just print the nearest integer.
579579
Example:
580-
If the following tuples are given as input to the program:
580+
If the following lines are given as console input to the program:
581581
UP 5
582582
DOWN 3
583583
LEFT 3

0 commit comments

Comments
 (0)