Skip to content

Commit 4bc7d57

Browse files
author
Om Prakash Manivannan
authored
Update test.md
1 parent 2692710 commit 4bc7d57

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -528,14 +528,12 @@ for i in reverse(100):
528528
</pre>
529529

530530
* * *
531-
532-
Question:
531+
**Question:**
533532
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:
534533
UP 5
535534
DOWN 3
536535
LEFT 3
537536
RIGHT 2
538-
��
539537
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.
540538
Example:
541539
If the following tuples are given as input to the program:
@@ -575,7 +573,6 @@ print int(round(math.sqrt(pos[1]**2+pos[0]**2)))
575573
</pre>
576574

577575
* * *
578-
579576
**Question:**
580577
Write a program to compute the frequency of the words from the input. The output should output after sorting the key alphanumerically.
581578
Suppose the following input is supplied to the program:
@@ -593,7 +590,7 @@ choosing:1
593590
or:2
594591
to:1
595592

596-
Hints
593+
**Hints:**
597594
In case of input data being supplied to the question, it should be assumed to be a console input.
598595

599596
**Solution:**
@@ -682,6 +679,7 @@ nico = Person()
682679
nico.name = "Nico"
683680
print "%s name is %s" % (Person.name, nico.name)
684681
</pre>
682+
685683
* * *
686684
**Question:**
687685
Define a function which can compute the sum of two numbers.
@@ -696,6 +694,7 @@ def SumFunction(number1, number2):
696694

697695
print SumFunction(1,2)
698696
</pre>
697+
699698
* * *
700699
**Question:**
701700
Define a function that can convert a integer into a string and print it in console.
@@ -704,12 +703,14 @@ Define a function that can convert a integer into a string and print it in conso
704703

705704
Use str() to convert a number to string.
706705

707-
Solution
706+
**Solution:**
707+
<pre>
708708
def printValue(n):
709709
print str(n)
710710

711711
printValue(3)
712712
</pre>
713+
713714
* * *
714715
**Question:**
715716
Define a function that can convert a integer into a string and print it in console.

0 commit comments

Comments
 (0)