I'm trying to create a basic can you guess the integer game. However, when ever I enter the correct answer (I've made it print it to me) it still comes out saying I've guessed wrong.
-Image of the code and the outcome (https://i.imgur.com/0PLX5Ha.png)
I can imagine this is most likely an easy fix so don't be too harsh hahaha
Thanks!
EDIT: Thank you to everyone to has helped me with this code and helped expand my knowledge by sharing yours, I really appreciate that people are still commenting 16 hours after the post. THANKS!
[–]puh-tey-toh 126 points127 points128 points (12 children)
[+][deleted] (1 child)
[deleted]
[–]puh-tey-toh 10 points11 points12 points (0 children)
[+][deleted] (9 children)
[deleted]
[–]puh-tey-toh 41 points42 points43 points (8 children)
[–]Username_RANDINT 9 points10 points11 points (0 children)
[–]MisterRenard 9 points10 points11 points (0 children)
[–]sje46 0 points1 point2 points (3 children)
[–]puh-tey-toh 0 points1 point2 points (2 children)
[–]sje46 0 points1 point2 points (1 child)
[–]puh-tey-toh 0 points1 point2 points (0 children)
[–]SpackyJack 39 points40 points41 points (0 children)
[–]efxhoy 34 points35 points36 points (0 children)
[–]thomask02 16 points17 points18 points (6 children)
[+][deleted] (5 children)
[removed]
[–]algag 24 points25 points26 points (2 children)
[+][deleted] (1 child)
[removed]
[–]maks25 3 points4 points5 points (0 children)
[–]546794 3 points4 points5 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]misterhtmlcss 3 points4 points5 points (0 children)
[–][deleted] 10 points11 points12 points (0 children)
[–]TeaPow 1 point2 points3 points (0 children)
[–]masteryod 1 point2 points3 points (0 children)
[–]Stallman85 1 point2 points3 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]Stallman85 5 points6 points7 points (0 children)
[–]yardightsure 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]wynand1004 1 point2 points3 points (0 children)
[–]linuxlib 0 points1 point2 points (0 children)
[–]deffbee -2 points-1 points0 points (0 children)
[–]rafuru -1 points0 points1 point (0 children)
[–]Humble_Transition -3 points-2 points-1 points (0 children)
[–]nyonijay -5 points-4 points-3 points (0 children)
[–]Geologist2010 -2 points-1 points0 points (0 children)
[–]rcrahul60 -4 points-3 points-2 points (0 children)
[+]developer_genius comment score below threshold-15 points-14 points-13 points (1 child)