Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
183c8a7
added badge (#36)
Logan1x Oct 16, 2017
d702b36
Update README.md (#37)
Logan1x Oct 16, 2017
30c1e2f
image to vector data (#35)
apuayush Oct 17, 2017
0992c26
Develop (#38)
Logan1x Oct 17, 2017
3418ea0
add offline dictionary (#45)
SuryaThiru Oct 18, 2017
07feb30
Sort scripts alphabetically (#48)
szepnapot Oct 19, 2017
e73e017
Set theme jekyll-theme-minimal
Logan1x Oct 20, 2017
a3fc020
Set theme jekyll-theme-architect
Logan1x Oct 20, 2017
c2099a6
Updated readme.md
Logan1x Oct 20, 2017
95940a3
Update README.md
Logan1x Oct 20, 2017
fd7fd85
Update README.md
Logan1x Oct 20, 2017
780965c
Added a python script to download high quality videos and audio using…
Oct 21, 2017
aef61fa
Feature/ftp download (#51)
ehnydeel Oct 23, 2017
4c9f7e4
added URL shortener (#55)
abhinavralhan Oct 24, 2017
e32313e
desciption of the Twitter_retweet_bot script (#54)
iyanuashiri Oct 24, 2017
d21c81e
added script to download formatted tweets from a specific user (#50)
pr0me Oct 24, 2017
8f36229
Meme density correction (#56)
Harshvardhan58 Oct 25, 2017
4275734
added cloud script (#57)
shivamp123 Oct 25, 2017
784ecbd
Update README.md (#59)
iyanuashiri Oct 26, 2017
a1cccde
Twitter retweet bot (#44)
iyanuashiri Oct 26, 2017
6131267
updated readme (#60)
Logan1x Oct 26, 2017
c59952c
Updated README.md (#61)
khushboopaddiyar Oct 26, 2017
90edb4c
Update README.md (#62)
ahadali Oct 26, 2017
f8675d9
Sentiment Analysis of Twitter Feeds (#64)
niharikakrishnan Oct 28, 2017
e8cc152
README.md (#72)
chiraag-jain Oct 28, 2017
01bf840
Edited the readme and arranged alphabetically (#75)
Logan1x Oct 31, 2017
e09e23b
Lost Robot script is added (#63)
dgupta777 Oct 31, 2017
bf8189e
Add new Feature getExternalIp.py (#53)
ehnydeel Oct 31, 2017
161cac8
Add fetch_html script (#52)
zinuzoid Oct 31, 2017
0f9e174
arranged root file directory
Logan1x Nov 7, 2017
91b0352
Added : readme.md (#78)
Logan1x Nov 7, 2017
8b5d00e
Added : Readme.md (#79)
Logan1x Nov 7, 2017
061adda
Merge branch 'develop' into master
Logan1x Nov 7, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Lost Robot script is added (#63)
* Create quiz

* Added Solution.py for Lost Robot
  • Loading branch information
dgupta777 authored and Logan1x committed Oct 31, 2017
commit e09e23b47705369651d8c7806b529066bfd5e435
15 changes: 15 additions & 0 deletions bin/Lost Robot/Solution.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#According to question we can only instruct robot up or down or left or right. So in his current coordiantes and home coordinates one of the/
#coordinate either X or Y must be same.
for _ in range(int(input()):
x1,y1,x2,y2=map(int,input().split())#This will parse input to x1,y1,x2 and y2
if x1!=x2 and y1!=y2:
print('sad')
elif x1==x2 and y1<y2:
print('up')
elif x1==x2 and y1>y2:
print('down')
elif y1==y2 and x1<x2:
print('right')
elif y1==y2 and x1>x2:
print('left')

34 changes: 34 additions & 0 deletions bin/Lost Robot/quiz
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

Robot Bunny is lost. It wants to reach its home as soon as possible. Currently it is standing at coordinates (x1, y1) in 2-D plane.
Its home is at coordinates (x2, y2). Bunny is extremely worried. Please help it by giving a command by telling the direction in which it
should to go so as to reach its home. If you give it a direction, it will keep moving in that direction till it reaches its home.
There are four possible directions you can give as command - "left", "right", "up", "down". It might be possible that you can't instruct
the robot in such a way that it reaches its home. In that case, output "sad".

Input
First line of the input contains an integer T denoting the number of test cases. T test cases follow.

First line of each test case contains four space separated integers x1, y1, x2, y2.

Output
For each test case, output a single line containing "left" or "right" or "up" or "down" or "sad" (without quotes).

Constraints
1 ≤ T ≤ 5000
0 ≤ x1, y1, x2, y2. ≤ 100
It's guaranteed that the initial position of robot is not his home.
Example

Input
3
0 0 1 0
0 0 0 1
0 0 1 1

Output:
right
up
sad

Explanation
Test case 1. If you give Bunny the command to move to the right, it will reach its home.