Professional Documents
Culture Documents
Sheet No.1+solution
Sheet No.1+solution
Sheet No.1+solution
4. Repeat prob3.0 but print out the content of the variable c as an integer.
2. a) string_one="Hi"
string_two="everybody"
print(string_one+" "+string_two+":)")
b) my_int=30
print(my_int)
print(type(my_int))
c) my_float=10.35
print(my_float)
3. a=9.5
b=5.0
c=a+b
print("a+b=",c)
4. a=9.5
b=5
c=a+b
print("a+b=",int(c))
5. x,y=98,60
print(x,y)
6. why=10
print(why,id(why))
why=20
print(why,id(why))
why=10
print(why,id(why))
because the integer number is immutable