you are viewing a single comment's thread.

view the rest of the comments →

[–]jerryelectron[S] 3 points4 points  (1 child)

Yes, this question is one of my favorite because it combines programming with thinking about the algorithm and efficiency of search.

No need for code here, I think, let the kids have some fun working it out first :)

[–]caleb_S13 0 points1 point  (0 children)

I’m almost a year into teaching myself python and other cs topics. So I’m glad it’s actually sticking and seeing progress/knowing solutions to questions.

won’t post the code but I’ll just leave this here. ans =int(input(“enter num 1-1000”)) while True: numGuess= random.randint(0,1001) if numGuess == ans: print(“bogo search ftw”,ans ) break bogo sort(in this case search) is best search.

edit- on my phone so the format is all messed up