-
Introduction 4
-
Lecture1.1
-
Lecture1.2
-
Lecture1.3
-
Lecture1.4
-
-
Production Possibilities Frontier 4
-
Lecture2.1
-
Lecture2.2
-
Lecture2.3
-
Lecture2.4
-
-
Trade 3
-
Lecture3.1
-
Lecture3.2
-
Lecture3.3
-
-
Demand 4
-
Lecture4.1
-
Lecture4.2
-
Lecture4.3
-
Lecture4.4
-
-
Supply 2
-
Lecture5.1
-
Lecture5.2
-
-
Equilibrium 4
-
Lecture6.1
-
Lecture6.2
-
Lecture6.3
-
Lecture6.4
-
-
Curve Movements 4
-
Lecture7.1
-
Lecture7.2
-
Lecture7.3
-
Lecture7.4
-
-
Elasticity and Revenue 5
-
Lecture8.1
-
Lecture8.2
-
Lecture8.3
-
Lecture8.4
-
Lecture8.5
-
-
Taxes 7
-
Lecture9.1
-
Lecture9.2
-
Lecture9.3
-
Lecture9.4
-
Lecture9.5
-
Lecture9.6
-
Lecture9.7
-
-
Consumer and Producer Surplus 8
-
Lecture10.1
-
Lecture10.2
-
Lecture10.3
-
Lecture10.4
-
Lecture10.5
-
Lecture10.6
-
Lecture10.7
-
Lecture10.8
-
-
Imports and Exports 4
-
Lecture11.1
-
Lecture11.2
-
Lecture11.3
-
Lecture11.4
-
-
Tariffs 2
-
Lecture12.1
-
Lecture12.2
-
Basic Python
Hello World
The first thing I want you to do is type the word print() into the textbox. This is the command that outputs text. Now inside the parentheses write “Hello World” with the quotations included. Quotations are used to mark the beginning and end of a string, which is what text is called in Python. Now either click the play button or hold shift-enter and it will run this line returning “Hello World” underneath. Make sure print is in all lower case or it will not work. Below is a picture of what is should look like.
Simple Addition
An important part of programming is variables, they are what store values for us. Type the below line into the new blank box, and hit enter.
X = 5
We have now declared X as having the value 5. Now if we wanted to see the value of 5, we could enter the below code in the next box. Remember that capitalization matters, print needs to be all lower case. Also x and X are two different variables, because of capitalization.
print(X)
This should print out the number 5. Notice that you don’t use quotations with variables. If you tried to print “X” you would print the actual letter x, not the variable. Now let’s try adding some stuff up.
Y = 3
Z = X+Y
print(Z)
If 8 was printed out then you are good to go!
Challenge