This repository has been archived by the owner on Nov 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3360a30
commit 3251e52
Showing
1 changed file
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
To define a class use the following syntax | ||
Error #2: Syntax error in the class definition | ||
|
||
class name: | ||
"Your code here" | ||
To define a class, use the following syntax: | ||
|
||
To define a class with multiple inheritance use the following syntax | ||
class <name>: | ||
[Your code here] | ||
|
||
class name(object1,object2): | ||
"Your code here" | ||
To define a class with multiple inheritance, use the following syntax: | ||
|
||
class <name>(<object1>,<object2>): | ||
[Your code here] | ||
|
||
In the above samples: | ||
1. Text written between <> is changeable as per requirement. | ||
2. Code goes between []. |