Computer Science, asked by sarojiniramanasetti, 1 month ago

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 anindyaadhikari13
10

\textsf{\large{\underline{Solution}:}}

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)

\textsf{\large{\underline{Explanation}:}}

  1. Line 1: Accepts the name from the user.
  2. Line 2: Accepts the mobile number from the user.
  3. Line 3: Accepts the favourite sports of the user.
  4. Line 4-7: Display the data provided by the user.

See the attachment for output.

Attachments:
Similar questions