From 43e09b890d2d41a5eaf92506ae6a98ed882d302c Mon Sep 17 00:00:00 2001 From: Adam Ditchfield Date: Thu, 10 Aug 2017 14:29:35 +0100 Subject: [PATCH] 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. --- 100+ Python challenging programming exercises.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/100+ Python challenging programming exercises.txt b/100+ Python challenging programming exercises.txt index 66c00215..b167af25 100644 --- a/100+ Python challenging programming exercises.txt +++ b/100+ Python challenging programming exercises.txt @@ -177,7 +177,7 @@ Level 2 Question: 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. -Note: i=0,1.., X-1; j=0,1,��Y-1. +Note: i=0,1.., X-1; j=0,1,¡­Y-1. Example Suppose the following inputs are given to the program: 3,5 @@ -225,7 +225,7 @@ print ','.join(items) Question 9 Level 2 -Question�� +Question£º Write a program that accepts sequence of lines as input and prints the lines after making all characters in the sentence capitalized. Suppose the following input is supplied to the program: Hello world @@ -425,7 +425,7 @@ Question: 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: D 100 W 200 -�� +¡­ D means deposit while W means withdrawal. Suppose the following input is supplied to the program: D 300 @@ -568,16 +568,16 @@ for i in reverse(100): Question 21 Level 3 -Question�� +Question£º 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: UP 5 DOWN 3 LEFT 3 RIGHT 2 -�� +¡­ 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. Example: -If the following tuples are given as input to the program: +If the following lines are given as console input to the program: UP 5 DOWN 3 LEFT 3