Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
why type(t) is Nonetype?????
0
votes
asked
Jun 24, 2019
by
???
(
130
points)
def ley(x,y,gg=1):
print(gg)
if(gg%x==0)&(gg%y==0):
print(type(gg))
return gg
else:
gg+=1
ley(x,y,gg)
t=ley(2,3,1)
print(type(t))
qpython
Please
log in
or register to answer this question.
2 Answers
0
votes
answered
Jun 28, 2019
by
krishna singh
Bcoz your function is non returning type hence its type(t) is none simply t=ley(2,3,1) will be treated as simply ley(2,3,1) and also function is of NoneType
Please
log in
or register to add a comment.
+1
vote
answered
Jun 29, 2019
by
Big Al
Your popping out of your function in the "else" condition. Since you're not returning a value there you are getting the NoneType response.
Please
log in
or register to add a comment.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...