The Smart Code Concept

0 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$39.99
List Price:  $79.99
You save:  $40
€33.89
List Price:  €67.80
You save:  €33.90
£29.58
List Price:  £59.17
You save:  £29.59
CA$54.67
List Price:  CA$109.36
You save:  CA$54.68
A$59.57
List Price:  A$119.15
You save:  A$59.58
S$51.32
List Price:  S$102.66
You save:  S$51.33
HK$310.92
List Price:  HK$621.92
You save:  HK$311
CHF 31.46
List Price:  CHF 62.93
You save:  CHF 31.47
NOK kr399.78
List Price:  NOK kr799.66
You save:  NOK kr399.88
DKK kr253.21
List Price:  DKK kr506.49
You save:  DKK kr253.27
NZ$68.40
List Price:  NZ$136.82
You save:  NZ$68.41
د.إ146.86
List Price:  د.إ293.76
You save:  د.إ146.90
৳4,882.54
List Price:  ৳9,766.30
You save:  ৳4,883.76
₹3,589.70
List Price:  ₹7,180.30
You save:  ₹3,590.59
RM161.95
List Price:  RM323.95
You save:  RM162
₦58,120.66
List Price:  ₦116,255.86
You save:  ₦58,135.20
₨11,192.81
List Price:  ₨22,388.42
You save:  ₨11,195.61
฿1,241.29
List Price:  ฿2,482.90
You save:  ฿1,241.61
₺1,713.58
List Price:  ₺3,427.59
You save:  ₺1,714.01
B$220.70
List Price:  B$441.46
You save:  B$220.76
R664.72
List Price:  R1,329.61
You save:  R664.89
Лв66.33
List Price:  Лв132.67
You save:  Лв66.34
₩57,951.51
List Price:  ₩115,917.52
You save:  ₩57,966
₪127.15
List Price:  ₪254.34
You save:  ₪127.19
₱2,347.93
List Price:  ₱4,696.45
You save:  ₱2,348.52
¥6,235.88
List Price:  ¥12,473.32
You save:  ¥6,237.44
MX$715.35
List Price:  MX$1,430.89
You save:  MX$715.53
QR146.04
List Price:  QR292.12
You save:  QR146.08
P525.92
List Price:  P1,051.97
You save:  P526.05
KSh5,154.71
List Price:  KSh10,310.71
You save:  KSh5,156
E£1,902.91
List Price:  E£3,806.30
You save:  E£1,903.39
ብር6,225.29
List Price:  ብር12,452.13
You save:  ብር6,226.84
Kz36,482.32
List Price:  Kz72,973.76
You save:  Kz36,491.44
CLP$36,158.55
List Price:  CLP$72,326.15
You save:  CLP$36,167.60
CN¥280.50
List Price:  CN¥561.07
You save:  CN¥280.57
RD$2,493.43
List Price:  RD$4,987.49
You save:  RD$2,494.06
DA5,175.47
List Price:  DA10,352.25
You save:  DA5,176.77
FJ$90.74
List Price:  FJ$181.51
You save:  FJ$90.76
Q306.11
List Price:  Q612.31
You save:  Q306.19
GY$8,359.32
List Price:  GY$16,720.74
You save:  GY$8,361.41
ISK kr5,017.14
List Price:  ISK kr10,035.54
You save:  ISK kr5,018.40
DH364.43
List Price:  DH728.96
You save:  DH364.52
L672.41
List Price:  L1,344.98
You save:  L672.57
ден2,086.26
List Price:  ден4,173.04
You save:  ден2,086.78
MOP$320.10
List Price:  MOP$640.29
You save:  MOP$320.18
N$666.98
List Price:  N$1,334.14
You save:  N$667.15
C$1,470.45
List Price:  C$2,941.27
You save:  C$1,470.82
रु5,734.19
List Price:  रु11,469.81
You save:  रु5,735.62
S/134.49
List Price:  S/269.01
You save:  S/134.52
K170.05
List Price:  K340.15
You save:  K170.10
SAR149.98
List Price:  SAR300.01
You save:  SAR150.02
ZK903
List Price:  ZK1,806.23
You save:  ZK903.22
L172.51
List Price:  L345.06
You save:  L172.55
Kč822.78
List Price:  Kč1,645.77
You save:  Kč822.98
Ft13,196.51
List Price:  Ft26,396.32
You save:  Ft13,199.81
SEK kr366.49
List Price:  SEK kr733.08
You save:  SEK kr366.58
ARS$58,004.26
List Price:  ARS$116,023.03
You save:  ARS$58,018.77
Bs277.19
List Price:  Bs554.46
You save:  Bs277.26
COP$151,645.57
List Price:  COP$303,329.06
You save:  COP$151,683.49
₡19,769.26
List Price:  ₡39,543.47
You save:  ₡19,774.20
L1,053.23
List Price:  L2,106.72
You save:  L1,053.49
₲272,242.03
List Price:  ₲544,552.14
You save:  ₲272,310.11
$U1,562.97
List Price:  $U3,126.35
You save:  $U1,563.37
zł142.76
List Price:  zł285.56
You save:  zł142.80
Already have an account? Log In

Transcript

Sometimes we want our program to do different things depending upon the value that we currently have. So in other words, we wanted to go different paths. We don't want our program to just run and keep executing line by line, we wanted to do smart things depending upon the value. And for example, if we have a gender variable, and the gender could be male or female, we wanted to do different things for male if the value is male, than if it was a female. And to accomplish that, we use two different operators. The first one is the switch.

The other one is if statement

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.