from IPython.display import Image
Image(url='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZtF-pSW_Qsr5vbkCey_g4ugJr7EBI4KAg4KRIAnH7vRHpEMRyJb4ytYVRa_C6b-iFNQpdDe__Qnot8fV475of1Wu8VxxuZtlpdRaSEUsL1iV5sQYwVrVofLAyoagpKH9sp5EZtON0hog/s1600/%255B%25ED%2581%25AC%25EA%25B8%25B0%25EB%25B3%2580%25ED%2599%2598%255D%255B%25ED%2581%25AC%25EA%25B8%25B0%25EB%25B3%2580%25ED%2599%2598%255D%25EC%259C%25A0%25ED%258A%259C%25EB%25B8%258C%25EC%258D%25B8%25EB%2584%25A4%25EC%259D%25BC.png')
Python Programing¶
Operator Calulation¶
- We could add, substract, multiply and divide using python
- Let's practice using blow example
1+1
1.0+1.0
1.0*2
10/3
10%3
10//3
Print Function(for debug)¶
- 'print' is the most used functions in programming
- Let's practice using below example
print("%f %d" %(10.0,10.0))
List and for function¶
- 'List' and 'for' are the most used functioins in python programming
- Let's practice like below examples.
List = ['machine','learning','versus','deep','learning']b
List
for i in List:
print(i)
Random function¶
- Random function are the most used function in machine learning
- Let's practice like below examples
from random import randint
_rand = randint(0,4)
print("%d %s" %(_rand,List[_rand]))
CLASS¶
- class definition is the most used skills in my programming
- Let's make class format like below example
class DeepLearningVersusMachineLearning():
def __init__(self):
self.name1 = "machinelearning"
self.name2 = "versus"
self.name3 = "deeplearning"
def _mix(self):
print(self.name1+self.name2+self.name3)
if __name__ == "__main__":
MVD = DeepLearningVersusMachineLearning()
MVD._mix()
No comments:
Post a Comment