This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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). | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
SECTOR_SIZE = 512 | |
def main(): | |
try: | |
if len(sys.argv) != 4: | |
raise Exception('Not Enough Arguments') | |
else: |