Lab1 Python0

In this lab I basically downloaded and used the programming language Python for the first time. Learning the basics of python.

Here I did the beginning step of my lab. I typed 1+1 then pressed enter where I got 2. After that I typed print ‘Hi Mom’ then pressed enter and got Hi Mom. Then I typed 1+1.2 then pressed enter and got 2.2. The last step I typed print hello and got an error

 

 

 

 

 

 

 

The Source Code is:

Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type “copyright”, “credits” or “license()” for more information.
>>> 1+1
2
>>> print’Hi Mom’
Hi Mom
>>> 1+1.2
2.2
>>> print hello

Traceback (most recent call last):
File “<pyshell#3>”, line 1, in <module>
print hello
NameError: name ‘hello’ is not defined
>>>

In this part of the lab I opened a new window where I typed print Hello World and then after Goodbye, then I pressed F5 to run module and came up with my final product shown above

 

 

 

 

 

 

 

 

The Source code is:

Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type “copyright”, “credits” or “license()” for more information.
>>> 1+1
2
>>> print’Hi Mom’
Hi Mom
>>> 1+1.2
2.2
>>> print hello

Traceback (most recent call last):
File “<pyshell#3>”, line 1, in <module>
print hello
NameError: name ‘hello’ is not defined
>>> ================================ RESTART ================================
>>>
Hello World
>>> ================================ RESTART ================================
>>>
Hello World
Goodbye
>>>