Write your first program

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
€63.02
List Price:  €90.04
You save:  €27.01
£53
List Price:  £75.71
You save:  £22.71
CA$97.88
List Price:  CA$139.83
You save:  CA$41.95
A$109.12
List Price:  A$155.90
You save:  A$46.77
S$91.34
List Price:  S$130.49
You save:  S$39.15
HK$545.48
List Price:  HK$779.30
You save:  HK$233.81
CHF 58.93
List Price:  CHF 84.20
You save:  CHF 25.26
NOK kr729.64
List Price:  NOK kr1,042.39
You save:  NOK kr312.74
DKK kr470.22
List Price:  DKK kr671.77
You save:  DKK kr201.55
NZ$118.71
List Price:  NZ$169.59
You save:  NZ$50.88
د.إ257.07
List Price:  د.إ367.26
You save:  د.إ110.19
৳8,487.38
List Price:  ৳12,125.34
You save:  ৳3,637.96
₹5,971.53
List Price:  ₹8,531.13
You save:  ₹2,559.59
RM303.65
List Price:  RM433.80
You save:  RM130.15
₦112,107.18
List Price:  ₦160,159.98
You save:  ₦48,052.80
₨19,665.18
List Price:  ₨28,094.32
You save:  ₨8,429.14
฿2,325.62
List Price:  ฿3,322.46
You save:  ฿996.84
₺2,714.78
List Price:  ₺3,878.43
You save:  ₺1,163.64
B$398.13
List Price:  B$568.79
You save:  B$170.65
R1,281.76
List Price:  R1,831.17
You save:  R549.40
Лв123.21
List Price:  Лв176.02
You save:  Лв52.81
₩99,629.56
List Price:  ₩142,334.04
You save:  ₩42,704.48
₪250.22
List Price:  ₪357.47
You save:  ₪107.25
₱3,900.54
List Price:  ₱5,572.44
You save:  ₱1,671.89
¥10,364.67
List Price:  ¥14,807.31
You save:  ¥4,442.64
MX$1,370.33
List Price:  MX$1,957.70
You save:  MX$587.36
QR254.89
List Price:  QR364.15
You save:  QR109.25
P953.67
List Price:  P1,362.44
You save:  P408.77
KSh9,047.86
List Price:  KSh12,926.07
You save:  KSh3,878.20
E£3,528
List Price:  E£5,040.22
You save:  E£1,512.21
ብር9,347.57
List Price:  ብር13,354.24
You save:  ብር4,006.67
Kz64,145.83
List Price:  Kz91,640.83
You save:  Kz27,495
CLP$66,133.06
List Price:  CLP$94,479.86
You save:  CLP$28,346.79
CN¥504.15
List Price:  CN¥720.25
You save:  CN¥216.09
RD$4,113.27
List Price:  RD$5,876.36
You save:  RD$1,763.08
DA9,363.05
List Price:  DA13,376.37
You save:  DA4,013.31
FJ$161.30
List Price:  FJ$230.45
You save:  FJ$69.14
Q537.30
List Price:  Q767.60
You save:  Q230.30
GY$14,616.09
List Price:  GY$20,881.03
You save:  GY$6,264.93
ISK kr9,247.07
List Price:  ISK kr13,210.67
You save:  ISK kr3,963.60
DH653.42
List Price:  DH933.50
You save:  DH280.07
L1,206.16
List Price:  L1,723.16
You save:  L517
ден3,876.29
List Price:  ден5,537.79
You save:  ден1,661.50
MOP$560.70
List Price:  MOP$801.04
You save:  MOP$240.33
N$1,280.53
List Price:  N$1,829.41
You save:  N$548.87
C$2,571.59
List Price:  C$3,673.85
You save:  C$1,102.26
रु9,494.60
List Price:  रु13,564.30
You save:  रु4,069.69
S/255.18
List Price:  S/364.56
You save:  S/109.38
K287.43
List Price:  K410.63
You save:  K123.20
SAR262.51
List Price:  SAR375.04
You save:  SAR112.52
ZK1,839.31
List Price:  ZK2,627.71
You save:  ZK788.39
L321.75
List Price:  L459.67
You save:  L137.91
Kč1,572.18
List Price:  Kč2,246.07
You save:  Kč673.89
Ft25,519.64
List Price:  Ft36,458.20
You save:  Ft10,938.55
SEK kr682.01
List Price:  SEK kr974.35
You save:  SEK kr292.33
ARS$79,124.05
List Price:  ARS$113,039.21
You save:  ARS$33,915.15
Bs484.46
List Price:  Bs692.12
You save:  Bs207.65
COP$294,796.59
List Price:  COP$421,156.04
You save:  COP$126,359.45
₡35,478.60
List Price:  ₡50,685.88
You save:  ₡15,207.28
L1,809.24
List Price:  L2,584.74
You save:  L775.50
₲558,159.89
List Price:  ₲797,405.45
You save:  ₲239,245.56
$U2,923.98
List Price:  $U4,177.30
You save:  $U1,253.31
zł267.83
List Price:  zł382.63
You save:  zł114.80
Already have an account? Log In

Transcript

Welcome back again. We are going to write our first program. How exciting is that? Yay. Okay, so hold on to your seats. We're getting ready to write our first program is going to be a very, very, very, very, very simple one.

Okay, so we installed Python already. Let's click on our little button there. Let's bring our idle proton Python up. I'm going to click on that. And then again, it's going to open in that beautiful little edit window. So just follow along with me if I go a little fast, you can always pause you can back it up.

Do whatever it is that you need to do, but make sure you type it exactly as I type it. The first word we're going to type is print. Make sure you do not misspell this because print is a imbedded Python command it comes with the program. So it already has functionality to it. So we're going to type print, if we misspell this, it is not going to work. Okay.

Anything that we are going to print to the screen and we want our users to see needs to be in parentheses, and it needs to have a quote around it. So let's do parentheses really quick. And then let's do our quotes. I'm just going to use a single quote. And in that, I'm going to type python programming is so fun, exclamation point. And that's it.

That's all we have to put because that's all we're going to do. Print. We have to use our parentheses and we have to use single quote. Python really doesn't care if you use single quotes or double quotes, but you have to use one or the other. You can't start it off with a single quote and end with a double quote or start off with a double quote and end with a single quote. So you just need to make sure that your quotes are the same throughout.

So we use the print function, we put in parentheses because we have what's called a string value. And we are in a quote, and we typed python programming is so fun. So perhaps I've typed or talked long enough that you've got all that typed in. So now that we have it all in there, what do we have to do? Well, we have to run it. So up here at the top, if you look, it says run.

Click on that and then click Run module. The other thing you can do is you can see right here, there is an f5 list an extra one Module. So if you get tired of clicking and clicking and clicking, you can just push us by f5. And then it will automatically run. So we're just going to click on Run module. Before you can run it, it must be saved.

So you're going to click OK to save it. You can save it wherever you want to save it, that's up to you. For me, I might like to save it in my documents. Give it whatever name you want, just you know, try to make sure it's relative to the program that you're writing so that you know what it's for. Click Save. And then once it's saved, it's going to run and this python shell window pops up.

And now you can see it says python programming is so fun. And that is what the users are going to see. Whenever the pro Ram is run. They don't see the print command. They don't see the quotes and they don't see the parentheses. What a quick lesson we wrote our first program.

So pat yourself on the back. You did a great, great job. See in the next lesson

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.