Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> x=5 >>> type(x) >>> y=5.6 >>> type(y) >>> name = "amir" >>> type(name) >>> name = 33 >>> type(name) >>> x+y 10.6 >>> x+x 10 >>> x*2*y 56.0 >>> y/x 1.1199999999999999 >>> x/y 0.8928571428571429 >>> 10//3 3 >>> 10/3 3.3333333333333335 >>> 4/2 2.0 >>> 4//2 2 >>> 2//3 0 >>> 10%2 0 >>> 11%2 1 >>> 23452345%10 5 >>> 453//10 45 >>> 2**10 1024 >>> 2**0.5 1.4142135623730951 >>> "amir" + "Hello" 'amirHello' >>> "amir"*8 'amiramiramiramiramiramiramiramir' >>> "4" + 5 Traceback (most recent call last): File "", line 1, in "4" + 5 TypeError: Can't convert 'int' object to str implicitly >>> str(5) '5' >>> type(str(5)) >>> int("67") 67 >>> float(5) 5.0 >>> int(6.7) 6 >>> int("abc") Traceback (most recent call last): File "", line 1, in int("abc") ValueError: invalid literal for int() with base 10: 'abc' >>> int("abc",16) 2748 >>> int("1+1") Traceback (most recent call last): File "", line 1, in int("1+1") ValueError: invalid literal for int() with base 10: '1+1' >>> int(1+1) 2 >>> #int("1"+"1") >>> ================================ RESTART ================================ >>> today= Mon rec= Mon strike= No Go to recitation >>> ================================ RESTART ================================ >>> today= Mon rec= Tue strike= No Go to another course >>> ================================ RESTART ================================ >>> today= Tue rec= tue strike= No Go to another course >>> print(today) Tue >>> today = "blabla" >>> print(today) blabla >>> ================================ RESTART ================================ >>> today= Tue rec= tue strike= No Go to another course >>> ================================ RESTART ================================ >>> today=Tue rec= tue strike= No Go to another course >>> 5=="5" False >>> 5==5 True >>> 5==5.0 True >>> ================================ RESTART ================================ >>> today= Wed rec= tue strike= No Go to lecture >>> ================================ RESTART ================================ >>> today= Wed rec= tue strike= Yes Stay Home! >>> 2**100 1267650600228229401496703205376 >>> ================================ RESTART ================================ >>> 0 has 6 zeros >>> ================================ RESTART ================================ >>> 1267650600228229401496703205376 has 6 zeros >>> for x in "abc": print(x*2) aa bb cc >>> for letter in "Hello": print(letter) H e l l o >>> ================================ RESTART ================================ >>> 1267650600228229401496703205376 has 6 zeros 1267650600228229401496703205376 has 6 zeros >>> ================================ RESTART ================================ >>> -1267650600228229401496703205376 has 0 zeros -1267650600228229401496703205376 has 6 zeros >>> ================================ RESTART ================================ >>> -1267650600228229401496703205376 has 0 zeros -1267650600228229401496703205376 has 6 zeros -1267650600228229401496703205376 has 6 zeros >>>