Lab Description: getting familiar with python data types assigning values to variables and using the variables with operators also and also comments in python.
Exercise 2
in the interpreter mode numbers displayed directly while “x=5” saved x as a variable with the value 5 and when using x in with the operator “x+1” it used the value of the variable x and displayed 6. while in the script mode the codes as it is displayed nothing when running the program.
after adding print in the script mode it showed the values as in the interpreter mode.
Exercise 3
width/2 displays 8 “int” instead of 8.5 as python doesn’t display fraction automatically.
width/2.0 displays 8.5 “float-point” as the entered data contain fraction.
height/3 displays 4.0 “float-point” as the entered data contain fraction.
1+2*5 displays 11 “int”.
delimiter*5 displays “…..” as the entered value was string so python used * to repeat the string value 5 times.