Question: I am writing the following code for Python 3. The following is the input. name = input('What is your name?') age = int(input('How old are

I am writing the following code for Python 3. The following is the input.

name = input('What is your name?')

age = int(input('How old are you?'))

print('Hello',name,'!', 'You were born in',2020 - age,'.')

The following is the output

What is your name? Heidi

How old are you? 51

Hello Heidi ! You were born in 1969 .

How do I get rid of the space before the ! and the space before the period?

Dee

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!