That is first time to use python
i make very simple code
errorr in result this line or write code right
print(+ brother +"is bigger than" + name )
please support me if you can
full code
name =input("your name: ")
brother =input("your brother name: ")
age =int(input("your age: "))
brother_age =int(input("your brother age: "))
print(name)
print(brother)
print(age)
print(brother_age)
if age < brother_age:
print(+ brother +"is bigger than" + name )
else:
if age == brother_age:
print(+ brother + same_age + name )
else:
print(+ brother +"is smaller than" + name )
print(+ brother + "is bigger than" + name )
The ‘+’ (plus) is the “string combiner” operator. Python is complaining about the above line because the leading ‘+’ doesn’t have a string on the left. So to make it work, use the following:
print( brother + "is bigger than" + name )
And the same change for the later print() lines as well.