1 Visitor Messages

  1. class add:
    n1 = 0
    n2 = 0
    #constuctor
    def add(self,n1,n2):
    self.num1 = n1
    self.num2 = n2

    def summ(self):
    if self.num1 > 0 and self.num2 > 0:
    c = self.num1 + self.num2
    return c
    #main fuction
    summ_total = 0
    total = add()
    for i in range(0,2):

    number1 = int(input("Enter first number"))
    number2 = int(input("Enter 2nd number"))
    total.add(number1,number2)
    summ_total = summ_total + total.summ()
    print(summ_total)
Showing Visitor Messages 1 to 1 of 1
About Captain Katsura

Basic Information


Statistics


Visitor Messages
Total Messages
1
Most Recent Message
December 6th, 2012 07:11 AM
General Information
Last Activity
June 15th, 2014 01:24 AM
Join Date
March 1st, 2012

2 Friends

  1. AutumncometAutumncomet is offline

    Bad at levity

    Autumncomet
  2. Knight KingKnight King is offline

    Discovered Stowaway

    Knight King
Showing Friends 1 to 2 of 2