Q. Write a program to read details like name class age of student and then print the details firstly in same line and then in separate line.

Make sure to have two blank lines in these two different types of prints.


You can understand by Watching video :-



Answer =

name = input("enter the name of student = ")
age = input("enter the age of student = ")
clas = input("enter the class of student = ")
print("name = ",name , "   age = ",age,"  class =",clas)
print()
print()
print("name = ",name)
print(" age = ",age)
print(" class =",clas)

Output :- 

enter the name of student = Path Walla
enter the age of student = 17
enter the class of student = 11
name =  Path Walla    age =  17   class = 11


name =  Path Walla
 age =  17
 class = 11

>>> 


5 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. the question said to have two blank lines between two different prints. but yours didn't have those blank lines.

    ReplyDelete
  2. add 's' to class in last line

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post