+ 1
Why answer was not also 7
7 ответов
+ 4
Is there some sample code you can provide?
+ 4
post a code in a question before posting it tho, who may know. so the issue here is that the last if statement is checking if the spam == "7", and that is a character (because of the quotes, string to be precise, characters are placed between single quotes ' '), and your spam variable is int value, so it cannot be directly transleted as 7 as a character, do you know what I am sayin'?
+ 2
spam = 7
if spam > 5:
print("5")
if spam > 8:
print("8")
if spam == "7":
print("7")
+ 1
What is the question? There is no context provided
+ 1
If statement .
+ 1
Thanks mr .paup
0
In this code why answer not contain 7 .