-
Notifications
You must be signed in to change notification settings - Fork 3
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
71bd068
commit 374e6dd
Showing
7 changed files
with
64 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"python.pythonPath": "C:\\Users\\Flash\\Anaconda3\\python.exe" | ||
} |
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,6 +1,4 @@ | ||
#Binary Operatons_Numpy\ | ||
|
||
#np is alias to numpy | ||
import numpy as np | ||
|
||
a = np.array( [[1, 2], | ||
|
File renamed without changes.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
def student(*args, **kwargs): | ||
print(args) | ||
print(kwargs) | ||
|
||
courses = ['Math', 'Science', 'History'] | ||
info = {'name' :'Deepak', 'age' :22} | ||
student(*courses,**info) |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
def welcome(greeting): | ||
return "Hello and {}".format(greeting) | ||
|
||
name = input("Enter Your Name Below : \n") | ||
age = int(input("Enter Your Age Below :\n")) | ||
print(welcome("Welcome"),'{}'.format(name)) | ||
if age < 18: | ||
print("You Are Not Eligible For Voting") | ||
|
||
else : | ||
print("You Are Eligible For Voting!") | ||
|
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
class Empl(object): | ||
|
||
"""docstring for Empl""" | ||
raise_amount = 1.04 | ||
def __init__(self, first, last, pay): | ||
self.first = first | ||
self.last = last | ||
self.pay = pay | ||
|
||
def fullname(self): | ||
return '{} {}'.format(self.first, self.last) | ||
|
||
def apply_raise(self): | ||
self.pay = int(self.pay * self.raise_amount) | ||
|
||
@classmethod | ||
def set_raise_amt(cls, amount): | ||
cls.raise_amount = amount | ||
|
||
def __repr__(self): | ||
return '{} {}'.format(self.first,self.last) | ||
|
||
def __str__(self): | ||
return '{} {}'.format(self.first,self.last) | ||
|
||
emp_1 = Empl('Deepak', 'Raj', 50) | ||
emp_2 = Empl('Keshav', 'Raj', 3235345) | ||
|
||
#print(emp_1.fullname()) | ||
#print(emp_2.fullname()) | ||
|
||
'''print(emp_1.pay) | ||
emp_1.apply_raise() | ||
print(emp_1.pay) | ||
''' | ||
#print(emp_1.__dict__) | ||
|
||
|
||
print(repr(emp_1)) | ||
print(str(emp_1)) | ||
|
||
|