forked from tdwojak/Python2017
commited tasks
This commit is contained in:
parent
4288d56ba2
commit
f372aff821
@ -2,14 +2,10 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
def isNumeric(x):
|
def isNumeric(x):
|
||||||
isTrue = True
|
|
||||||
for i in range(len(x)):
|
for i in range(len(x)):
|
||||||
if isinstance(x[i], (int , float )):
|
if isinstance(x[i], (int , float ))==False:
|
||||||
if isTrue == False:
|
return False
|
||||||
pass
|
return True
|
||||||
else:
|
|
||||||
isTrue = False
|
|
||||||
return isTrue
|
|
||||||
|
|
||||||
print(isNumeric([1,4,5.4]))
|
print(isNumeric([1,4,4.8,4]))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user