+ 1
how do i do for print it on the same row
# age calculater x = 2020 # give input as your year of birth y = int(input()) print("your age is") print(x - y)
5 Réponses
+ 4
Thx for all the answers
+ 4
x = 2020
y = int(input())
print("your age is", x - y)
or more shorter code(one liner):
print("your age is", 2020 - int(input()))
+ 3
print("your age is", end=' ')
+ 2
its a parameter you can use in print statements.
end is normally set to = '\n' (newline) but you can change it to whatever suits your needs.
+ 1
What is the language you use? Please put the language you use in the tags.