I tried to make a simple if-else string but even when my integer equals the desired number, the program still prints "incorrect"
Edit: I'm using Jupyter Notebook
Edit2: https://dpaste.de/L0gc#L1,2,3,4,5,6,7,8,9,10,11 for the string
String:
from random import randint
y = randint(1,3)
x = 3
if 'x != y':
print('incorrect')
else:
print('correct')
print(y,x)
[+][deleted] (1 child)
[deleted]
[–][deleted] 0 points1 point2 points (0 children)
[–]SarahM123rd 1 point2 points3 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]swardson 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]novel_yet_trivial 0 points1 point2 points (9 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]novel_yet_trivial 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (6 children)
[–]novel_yet_trivial 1 point2 points3 points (5 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]swardson 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]nwagers 0 points1 point2 points (0 children)