RE: syntaxwise, what is the best programming language?
08-17-2016, 09:30 PM
(This post was last modified: 08-17-2016, 09:30 PM by Kíeros.)
(08-17-2016, 06:52 PM)qwerx3 Wrote: »Challenge: construct a Python program that determines whether a program will run into an infinite loop or not.Actually, I just realised this is doable, because you forgot one key part of the halting problem. You never said this program couldn't run infinitely either. So I'm pretty sure something like this would work:
Code:
check=exec([other program])
if check==None:
return True
else:
return False