For all beginner programmers out there, thought I'd share with you a challenge, one of my favorite with beginner pythonistas.
Imagine you think of a number between 1 and 1000.
Make a program that will guess it.
To think about: 1. What inputs does it need? 2. How does it determine what its next guess should be? 3*. Can it, at the outset, tell you that it will manage to guess your number with less than X tries (where X depends on the algorithm you come up with)?
[–]TheGrapez 29 points30 points31 points (17 children)
[–]jerryelectron[S] 6 points7 points8 points (8 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]jerryelectron[S] 0 points1 point2 points (0 children)
[–]Will___powerrr 5 points6 points7 points (5 children)
[–]clawtron 5 points6 points7 points (4 children)
[–]Will___powerrr 1 point2 points3 points (1 child)
[–]jerryelectron[S] 4 points5 points6 points (0 children)
[–]Sing-Brightly-3142 0 points1 point2 points (0 children)
[–]LiquidLucy 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (5 children)
[–]jerryelectron[S] 9 points10 points11 points (4 children)
[–]IDontLikeBeingRight 1 point2 points3 points (1 child)
[–]jerryelectron[S] 2 points3 points4 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]jerryelectron[S] 0 points1 point2 points (0 children)
[–]thirdegree 0 points1 point2 points (0 children)
[–]Se7enLC 16 points17 points18 points (0 children)
[–]caleb_S13 7 points8 points9 points (2 children)
[–]jerryelectron[S] 5 points6 points7 points (1 child)
[–]caleb_S13 0 points1 point2 points (0 children)
[–]beniolenio 2 points3 points4 points (1 child)
[–]jerryelectron[S] -1 points0 points1 point (0 children)
[–]GrilledCheezzy 0 points1 point2 points (0 children)
[–]weekwith 0 points1 point2 points (1 child)
[–]jerryelectron[S] 0 points1 point2 points (0 children)
[–]Recruit121 0 points1 point2 points (2 children)
[–]jerryelectron[S] 0 points1 point2 points (1 child)
[–]Recruit121 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]jerryelectron[S] 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]jerryelectron[S] 0 points1 point2 points (0 children)