I think you should be using some function to push in the data, not
referencing it with an offset address and then trying to push in.
The Python documents should give you the required information about the
same.
--
Sayantan Bhattacharya
[Sent from pine@dev-machine]
On Sun, 19 Aug 2018, ankur
Hey,
You need to use std.append(STUDENT(roll,name,present,absent))
Since you have just initialized the list named std, there is no index
available in the begining.
Thanks,
Prince
On Sun, 19 Aug 2018, 16:00 Sayantan, wrote:
> Hello Ankur,
>
> A few things before we take the program in
Dear Sayantan, Mohit
Tried executing by implementing following change
class STUDENT:
no_of_students=0
def __init__(self,roll,name,present,absent):
self.roll=roll
self.name=name
self.present=present
self.absent=absent
STUDENT.no_of_students+=1
std= []
n='Y'
i=0
while n=='Y' or n=='y':
Hello Ankur,
A few things before we take the program in context:
1. Always paste the code in a page(pastebin/paste.ubuntu.com & the like)
so that the indentation remains proper. This will help the members to
easily figure out the issue with the code.
2. Always refer to the error message
-- Forwarded message -
From: ankur gupta
Date: Sun, Aug 19, 2018 at 3:07 PM
Subject: Please help with this code
To:
Dear Sir
I am new to python programing, I am getting error while executing this
code. I want to generate multiple instance using while loop to store data