LAB1-Python0

This is the first program in python. we learned how to use print in python.

Simple code:

print (‘Hello World’)
print (‘Goodbye’)

Correction code:

message = ‘And now for something completely different’
number = 17
pi = 3.1415926535897932
a_boolean = True
a_list = [4, 1, 3, 5, 6, 9, 2, 11]

print (‘The string store in the message is ==> ‘, message)
print (‘The number stored in N is ==>’, number)
print (‘The number (this is a float) stored in pi is ==> ‘,  pi)
print (‘The Boolean value stored in a_boolean is ==> ‘, a_boolean)
print (‘The list has the following elements:’)
for element in a_list:
print (‘ –> ‘, element)