I have tried this code and it hasn't worked if I enter a number I am getting an error with code. Does anyone have a solution to why it not working?
def main():
string=int(input("How many strings do you want to enter? "))
for num in range(1,string+1):
value=float(input("Enter string %a: "%num))
print("No of positive whole numbers entered is:",IsPos(val))
def IsPos(val):
counterVal=0;
for whole_number in value:
if val.is_integer() and val>=0:
counterVal+=1
return counterVal;
main()