Skip to main content

Posts

# Create A Class With A Class Attribute A ; Create An Object From it And Set a Directly Using Object a=0 does

    # Create A Class  With A Class Attribute A  ; Create An Object From it And Set a Directly Using Object a=0 does #  this charge the class attribute   class Sample :     a = " harry " obj = Sample () obj . a = " vikky " print ( Sample . a ) print ( obj . a ) print ( " Then Answer is this is not change the class attribute " )
Recent posts

write a class programme Of Calculator of Sqaure Root , Sqaure and Cube Of A Number

write a class programme Of Calculator of Sqaure Root , Sqaure and Cube Of A Number    class calculator :     def __init__ ( self , num ) :         self . number = num         def square ( self ) :         print ( f "the value of { self . number } square is { self . number ** 2} " )     def squareroot ( self ) :           print ( f "the value of { self . number } square root is { self . number ** 0.5} " )     def cube ( self ) :           print ( f "the value of { self . number } cube is { self . number ** 3} " ) a = calculator ( 25 ) a . square () a . squareroot () a . cube () output the value of 25 square is 625 the value of 25 square root is 5.0 the value of 25 cube is 15625

multification of any number With Python Programme

n = 2 t = 27 for i in range ( 11 ):     print ( t * ( i + 1 )) // Write The Python For Enter by the user t = int ( input ( " Enter the Table no : " )) for i in range ( 1 , 11 ):     print ( t , ' X ' , i , ' = ' , t * ( i )) output # user enter 49 Enter the Table no : 49 49 X 1 = 49 49 X 2 = 98 49 X 3 = 147 49 X 4 = 196 49 X 5 = 245 49 X 6 = 294 49 X 7 = 343 49 X 8 = 392 49 X 9 = 441 49 X 10 = 490

Write A python Programme To Get Lowest Number

  def maximum ( num1 , num2 , num3 ):     if ( num1 < num2 ):         if ( num1 < num3 ):             return ( num1 )         else :             return ( num3 )     else :         if ( num2 < num3 ):             return ( num2 )         else :             return ( num3 ) m = maximum ( 18 , 85 , 62 ) print ( "the maxmimum Value of M  : " + str ( m ) )

Write a Python Programme To Find The Gratest Number

def maximum ( num1 , num2 , num3 ):     if ( num1 > num2 ):         if ( num1 > num3 ):             return ( num1 )         else :             return ( num3 )     else :         if ( num2 > num3 ):             return ( num2 )         else :             return ( num3 ) m = maximum ( 18 , 85 , 62 ) print ( "the maxmimum Value of M  : " + str ( m ) )   def maximum ( num1 , num2 , num3 ):     if ( num1 > num2 ):         if ( num1 > num3 ):             return ( num1 )         else :             return ( num3 )     else :         if ( num2 > num3 ):             return ( num2 ) ...