Python Class Print Name || Basic Program || Python
In this we are going to see a basic program to print name using classes in Python Programming Language.




class A:
    def printname():
        print("Enter name: ", end='')
        name = input()
        print("Name is ", end='')
        print(name, end='')
 
 
obj1 = A()
A.printname()
 
#Coded by SAAHIL


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post