Exercise and Solution 1

Building Command Line Tools with Python, Julia and Nodejs Module 02 - Building Command Line Tools in Python with Google's Fire
4 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€59.81
List Price:  €85.45
You save:  €25.63
£52.09
List Price:  £74.42
You save:  £22.32
CA$98.25
List Price:  CA$140.37
You save:  CA$42.11
A$108.21
List Price:  A$154.60
You save:  A$46.38
S$90.58
List Price:  S$129.40
You save:  S$38.82
HK$543.66
List Price:  HK$776.69
You save:  HK$233.03
CHF 55.23
List Price:  CHF 78.90
You save:  CHF 23.67
NOK kr705.33
List Price:  NOK kr1,007.66
You save:  NOK kr302.32
DKK kr446.76
List Price:  DKK kr638.26
You save:  DKK kr191.49
NZ$122.20
List Price:  NZ$174.57
You save:  NZ$52.37
د.إ257.03
List Price:  د.إ367.21
You save:  د.إ110.17
৳8,487.11
List Price:  ৳12,124.96
You save:  ৳3,637.85
₹6,156.92
List Price:  ₹8,795.98
You save:  ₹2,639.06
RM295.77
List Price:  RM422.55
You save:  RM126.78
₦102,518.55
List Price:  ₦146,461.35
You save:  ₦43,942.80
₨19,726.53
List Price:  ₨28,181.96
You save:  ₨8,455.43
฿2,286.15
List Price:  ฿3,266.07
You save:  ฿979.92
₺2,936.12
List Price:  ₺4,194.64
You save:  ₺1,258.52
B$381.10
List Price:  B$544.45
You save:  B$163.35
R1,220.43
List Price:  R1,743.55
You save:  R523.11
Лв116.97
List Price:  Лв167.11
You save:  Лв50.14
₩99,576.12
List Price:  ₩142,257.70
You save:  ₩42,681.57
₪232.35
List Price:  ₪331.95
You save:  ₪99.59
₱4,072.19
List Price:  ₱5,817.66
You save:  ₱1,745.47
¥10,475.77
List Price:  ¥14,966.03
You save:  ¥4,490.26
MX$1,296.54
List Price:  MX$1,852.29
You save:  MX$555.74
QR253.98
List Price:  QR362.85
You save:  QR108.86
P930.75
List Price:  P1,329.70
You save:  P398.95
KSh9,017.51
List Price:  KSh12,882.71
You save:  KSh3,865.20
E£3,330.13
List Price:  E£4,757.53
You save:  E£1,427.40
ብር10,302.47
List Price:  ብር14,718.45
You save:  ብር4,415.97
Kz63,829.34
List Price:  Kz91,188.68
You save:  Kz27,359.34
CLP$66,857.24
List Price:  CLP$95,514.44
You save:  CLP$28,657.20
CN¥498.76
List Price:  CN¥712.55
You save:  CN¥213.78
RD$4,408.63
List Price:  RD$6,298.32
You save:  RD$1,889.68
DA9,102.47
List Price:  DA13,004.09
You save:  DA3,901.62
FJ$159.32
List Price:  FJ$227.62
You save:  FJ$68.29
Q533.70
List Price:  Q762.47
You save:  Q228.76
GY$14,578.25
List Price:  GY$20,826.97
You save:  GY$6,248.71
ISK kr8,493.98
List Price:  ISK kr12,134.78
You save:  ISK kr3,640.80
DH642.23
List Price:  DH917.52
You save:  DH275.28
L1,180.37
List Price:  L1,686.32
You save:  L505.94
ден3,685.73
List Price:  ден5,265.55
You save:  ден1,579.82
MOP$557.89
List Price:  MOP$797.03
You save:  MOP$239.13
N$1,206.23
List Price:  N$1,723.26
You save:  N$517.03
C$2,564.21
List Price:  C$3,663.31
You save:  C$1,099.10
रु9,843.57
List Price:  रु14,062.84
You save:  रु4,219.27
S/237.19
List Price:  S/338.86
You save:  S/101.67
K292.95
List Price:  K418.51
You save:  K125.56
SAR262.49
List Price:  SAR375.01
You save:  SAR112.51
ZK1,576.54
List Price:  ZK2,252.30
You save:  ZK675.75
L304.38
List Price:  L434.85
You save:  L130.47
Kč1,455.27
List Price:  Kč2,079.05
You save:  Kč623.77
Ft23,370.72
List Price:  Ft33,388.18
You save:  Ft10,017.45
SEK kr661.66
List Price:  SEK kr945.27
You save:  SEK kr283.61
ARS$98,371.37
List Price:  ARS$140,536.55
You save:  ARS$42,165.18
Bs481.51
List Price:  Bs687.90
You save:  Bs206.39
COP$271,543.54
List Price:  COP$387,935.98
You save:  COP$116,392.43
₡35,034.72
List Price:  ₡50,051.75
You save:  ₡15,017.02
L1,830.23
List Price:  L2,614.73
You save:  L784.49
₲492,694.98
List Price:  ₲703,880.14
You save:  ₲211,185.16
$U2,802.27
List Price:  $U4,003.41
You save:  $U1,201.14
zł254.43
List Price:  zł363.49
You save:  zł109.05
Already have an account? Log In

Transcript

All right, so welcome back again. So in this particular session, we try to see another solution to our SSIS on fire, right was creating a simple COI to calculate all of these features. Now let's see an alternative. So we use simple functions to help us solve a problem. And let's see another option of using a class right. So I'm just going to compare the same thing right into a class, I'm just going to use class, then I'm going to keep it as my cow.

Complete, right? Let's make it a lot later. Then from here, I'm just going to supply the particular argument. So let's make this one as S for the s that we have here. Then I'll create another one for the Y, right so this is a simple class option using a class as our solution. Very interesting.

So let's pass in the y very simple, so there is something something very simple we have created a simple class. Now reposition this entire stuff well under A class calculator right our class called calc, then how to change all of these things into a better format, right. So, we change all of this to something better. So, think of all of this in passing. So, something very simple right? That is another option in our change or the X or the y.

And of course, self one is just as we do in normal class. So this self is self is referring to the self. The surface that's very interesting, but it is something very basic. So with this simple core of bringing a class here, we are able to commit or create a simple cluster from the old traditional jihad. So let's call this one as simple called see that So that is all you can actually export a class, you can just go without the class by going with this option called as we have to let's save it and let's come back to them No, then run it as Python three. Then the same example that you had which was beating coxy li spun it will just help.

Now I see that it's working perfectly well. You will keep us basically so I did a synopsis samples coxy li referring to the casilla here a simple coffee like you have the way to use it to update the format in which you can use this particular stuff. And there is this description. And these are the documents right so how do you record this very simple Just come back to what you have done so far. And I can just pass in my Coke, just as we saw here, right click, just go with this particular value. So the value is going to be is going to be any number, so let's make it like 30.

Then why is going to be 20 then it gets to artists as good as with art nice to add important, very, very interesting fifth grade. Kids also want to multiply, multiply. So that is something very interesting, because I want to divide right because this is class option. In any case, I want to subtract 20 subtract 50. So that is the basic idea to see all the various factions that have been exposed and just come back to the same thing that we did. We did help them from actually passing the test in a way right just as we heard you like this Option is going to help you to see a diverse musical liquidity, there is another way of working.

So, we have our add or divide or multiply or subtract and this idea for this day, so, that is something very interesting, very simple. So, the basic idea is that you can just complete whatever tonight you have, right? The solution that we did add, subtract, multiply, divide into a class object, then you pass in these particular functions, then it gives you a colony to just push it away with a special option to call it then you supply the command, right? Very interesting, just as we did this, for the subtract for the divide for the multiply and for the other than this alternative solution metric I use, but I seem singular problem. So with with this, if I can do a lot of things. There are several ways of working in Python.

So thank you for watching, and see the next session. Stay blessed.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.