Skip to content

Instantly share code, notes, and snippets.

View sagarladla's full-sized avatar
🌞

Sagar Ladla sagarladla

🌞
View GitHub Profile
/*
1) Given a string, you have to check if it is a valid number or not.(The number can be signed, floating point/integer).
If it is a number return true else return false.
The constraints were :-
i) No decision statements allowed (No if-else,no switch-case).
ii) No ternary conditional operators allowed (? : not allowed).
iii) No looping statements allowed (No for/while/do-while).
@blaquee
blaquee / readdisk.py
Created August 2, 2013 23:19
rawdisk python
import os
import sys
SECTOR_SIZE = 512
def main():
try:
if len(sys.argv) != 4:
raise Exception('Not Enough Arguments')
else: