0

''' I'm getting none in the output along with the answers in this python program'''

class marks1():
  def __init__(x,name,class1,*marks):
    x.name = name
    x.class1 = class1
    x.marks = sum(marks)

  def nameclass(x):
    print( "{} belongs to class{}".format(x.name,x.class1))
 
  def marksavg(x):
    avg= x.marks/5
    return avg

n = marks1("janani","6-B",92,87,75,88,90)
print(n.nameclass())
print(n.marksavg())
Ajo
  • 1
  • 1
  • Welcome to Stack Overflow. Please read [ask] and the [formatting help](https://stackoverflow.com/help/formatting), and [please try](https://meta.stackoverflow.com/questions/261592) to [research](https://duckduckgo.com/?q=python+output+none) questions before asking. – Karl Knechtel Jun 03 '22 at 05:53

0 Answers0