Write a python program to declare 3input variables ,name,mobile,sports,and print the Personal detailsin different lines by collecting thedatafrom the user usinginput()-function with promptmessageas shown in the output shown below
Answers
Answered by
10
The given problem is solved using language - Python.
name=input('Enter your name: ')
mobile=int(input('Enter your mobile number: '))
sports=input('Enter your favourite sports: ')
print('\n----------------\n')
print('Name:',name)
print('Mobile Number:',mobile)
print('Favourite Sports:',sports)
- Line 1: Accepts the name from the user.
- Line 2: Accepts the mobile number from the user.
- Line 3: Accepts the favourite sports of the user.
- Line 4-7: Display the data provided by the user.
See the attachment for output.
Attachments:
Similar questions