+ 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)

2nd Aug 2020, 7:02 PM
Haroun
5 Respostas
+ 4
Thx for all the answers
2nd Aug 2020, 7:20 PM
Haroun
+ 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()))
2nd Aug 2020, 7:22 PM
RKK
RKK - avatar
+ 3
print("your age is", end=' ')
2nd Aug 2020, 7:03 PM
Slick
Slick - avatar
+ 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.
2nd Aug 2020, 7:09 PM
Slick
Slick - avatar
+ 1
What is the language you use? Please put the language you use in the tags.
2nd Aug 2020, 7:08 PM
sneeze
sneeze - avatar