Home > other >  python
python

Time:10-11

Already had a number of student data, including student id, name, program design basis, higher math and English achievement, requirements definition class students, and its average member function for each course, pay attention to is the average for more than one person of each course,

CodePudding user response:

The building Lord what is thinking?
The card on which issue is up

CodePudding user response:

The
reference 1 floor Vv. Stone3 response:
the building Lord what is thinking?
Is on the question of which card to

Is unable to call a function to solve many personal average of only branch course

CodePudding user response:

refer to the second floor bengbengbenng response:
Quote: reference 1 floor Vv. Stone3 response:
the building Lord what is thinking?
Is on the question of which card to

Is unable to call a function to solve many personal scored an average of only branch course

Topic is to define a class, there is a lot of function in

For example,
1. Define a function input student information
2. Define an input function of the three grades
3. Define a function for average
4. Define a main function (main)
Call a function of 1, 2, 3

CodePudding user response:

This class is to create a table, the table of each row is a student's information, can be "one of them in column data to calculate, you this should be to want you to learn to encapsulate database, the database is the basis of the function

CodePudding user response:

reference 3 floor Vv. Stone3 response:
Quote: refer to the second floor bengbengbenng response:

The
Quote: reference 1 floor Vv. Stone3 response:
the building Lord what is thinking?
Is on the question of which card to

Is unable to call a function to solve many personal scored an average of only branch course

Topic is to define a class, there is a lot of function in

For example,
1. Define a function input student information
2. Define an input function of the three grades
3. Define a function for average
4. Define a main function (main)
1, 2, 3 of the function called

But if there are multiple students, how to call a function for the same subjects scored an average of?

CodePudding user response:

reference 4 floor JMZL response:
this class is to create a table, the table of each row is a student's information, can be "one of them in column data to calculate, you this should be to want you to learn to encapsulate database, the database is the basic function of

Not, it is call the relevant function in python, is for each grade point average and as senior haven't learned

CodePudding user response:

if a method defined in a class for the average of all the students, you can use singly linked lists to solve,

Please refer to the following code, to improve,



CodePudding user response:

The Sublime does text3 don't know there is a plug-in Python3 new f - string syntax,
Mark,

CodePudding user response:

refer to the eighth floor brother huang Python training response:
the Sublime does text3 don't know there is a plug-in Python3 new f - string syntax,
Mark,

Thank you, this method can also find the other way! Thank you for your bosses

CodePudding user response:

This with database + python easier, what do you what's the meaning of direct writing python, can put how many data