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 = 3.67 >>> type(y) >>> name = "Amir" >>> type(name) >>> name = "Dudi\n" >>> print(name) Dudi >>> name = "Amir" >>> print(name) Amir >>> name 'Amir' >>> x 5 >>> y 3.67 >>> x+y 8.67 >>> x*2 10 >>> y-3 0.6699999999999999 >>> x/y 1.3623978201634879 >>> 5/6 0.8333333333333334 >>> 6/3 2.0 >>> 4//2 2 >>> 5//2 2 >>> 10//3 3 >>> 2//3 0 >>> 2**10 1024 >>> 9**0.5 3.0 >>> 10%2 0 >>> 11%2 1 >>> (2**10)%10 4 >>> 1/3 0.3333333333333333 >>> 5/6 0.8333333333333334 >>> "Hello" + "Amir" 'HelloAmir' >>> "Hello"*10 'HelloHelloHelloHelloHelloHelloHelloHelloHelloHello' >>> "4"+5 Traceback (most recent call last): File "", line 1, in "4"+5 TypeError: Can't convert 'int' object to str implicitly >>> letter = "d" >>> type(letter) >>> str(56) '56' >>> type(str(3465)) >>> int("345") 345 >>> float("45.6") 45.6 >>> int(3.14) 3 >>> int(3.78) 3 >>> int("a") Traceback (most recent call last): File "", line 1, in int("a") ValueError: invalid literal for int() with base 10: 'a' >>> int("a",16) 10 >>> print(a) Traceback (most recent call last): File "", line 1, in print(a) NameError: name 'a' is not defined >>> print(3) 3 >>> >>> ================================ RESTART ================================ >>> Go to recitation >>> ================================ RESTART ================================ >>> today= Tue rec= Tue strike= No Go to recitation >>> ================================ RESTART ================================ >>> today= Sun rec= Tue strike= Yes Stay home!! >>> "Sun" == "sun" False >>> ================================ RESTART ================================ >>> today= sun rec= Tue strike= Yes Go to Hedva >>> 5==5 True >>> 5!=5 False >>> type(True) >>> 2**100 1267650600228229401496703205376 >>> ================================ RESTART ================================ >>> 0 has 6 zeros >>> ================================ RESTART ================================ >>> 1267650600228229401496703205376 has 6 zeros >>> ================================ RESTART ================================ >>> 0 has 0 zeros >>> ================================ RESTART ================================ >>> #here we indented the last line of the first solution (into the while loop) 1267650600228229401496703205376 has 0 zeros 1267650600228229401496703205376 has 0 zeros 1267650600228229401496703205376 has 0 zeros 1267650600228229401496703205376 has 0 zeros 1267650600228229401496703205376 has 1 zeros 1267650600228229401496703205376 has 1 zeros 1267650600228229401496703205376 has 1 zeros 1267650600228229401496703205376 has 2 zeros 1267650600228229401496703205376 has 2 zeros 1267650600228229401496703205376 has 2 zeros 1267650600228229401496703205376 has 2 zeros 1267650600228229401496703205376 has 2 zeros 1267650600228229401496703205376 has 2 zeros 1267650600228229401496703205376 has 3 zeros 1267650600228229401496703205376 has 3 zeros 1267650600228229401496703205376 has 3 zeros 1267650600228229401496703205376 has 3 zeros 1267650600228229401496703205376 has 3 zeros 1267650600228229401496703205376 has 3 zeros 1267650600228229401496703205376 has 3 zeros 1267650600228229401496703205376 has 3 zeros 1267650600228229401496703205376 has 4 zeros 1267650600228229401496703205376 has 5 zeros 1267650600228229401496703205376 has 5 zeros 1267650600228229401496703205376 has 6 zeros 1267650600228229401496703205376 has 6 zeros 1267650600228229401496703205376 has 6 zeros 1267650600228229401496703205376 has 6 zeros 1267650600228229401496703205376 has 6 zeros 1267650600228229401496703205376 has 6 zeros 1267650600228229401496703205376 has 6 zeros >>> for x in "Amir": print(x*2) AA mm ii rr >>> for letter in "12345": print(letter+1) Traceback (most recent call last): File "", line 2, in print(letter+1) TypeError: Can't convert 'int' object to str implicitly >>> for letter in "12345": print(letter+"1") 11 21 31 41 51 >>> ================================ RESTART ================================ >>> 1267650600228229401496703205376 has 6 zeros 1267650600228229401496703205376 has 6 zeros >>> digit '6' >>> ================================ RESTART ================================ >>> 1267650600228229401496703205376 has 6 zeros 1267650600228229401496703205376 has 6 zeros 1267650600228229401496703205376 has 6 zeros >>> ================================ RESTART ================================ >>> 1267650600228229401496703205376 has 6 zeros 1267650600228229401496703205376 has 6 zeros 1267650600228229401496703205376 has 6 zeros >>>