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. >>> name = input("Please enter your name") Please enter your nameAmir >>> name 'Amir' >>> grade = input("what's your grade in CS1001?: ") what's your grade in CS1001?: 95 >>> grade '95' >>> type(grade) >>> grade = float(input("what's your grade in CS1001?: ")) what's your grade in CS1001?: 95 >>> grade 95.0 >>> grade = float(input("what's your grade in CS1001?: ")) what's your grade in CS1001?: aaa Traceback (most recent call last): File "", line 1, in grade = float(input("what's your grade in CS1001?: ")) ValueError: could not convert string to float: 'aaa' >>> Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> Enter a positive integer to apply Collatz algorithm: 7 7 is OK >>> ================================ RESTART ================================ >>> Enter a positive integer to apply Collatz algorithm: 7 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1 7 is OK >>> print("Hello\nAmir") Hello Amir >>> print() >>> ================================ RESTART ================================ >>> Enter a positive integer to apply Collatz algorithm: 7 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1 7 is OK >>> ================================ RESTART ================================ >>> Enter a positive integer to apply Collatz algorithm: 7 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 7 is OK >>> ================================ RESTART ================================ >>> Apply Collatz Alg. from 1 to...: 10 1, 1 is OK 2 1, 2 is OK 3 10 5 16 8 4 2 1, 3 is OK 4 2 1, 4 is OK 5 16 8 4 2 1, 5 is OK 6 3 10 5 16 8 4 2 1, 6 is OK 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 7 is OK 8 4 2 1, 8 is OK 9 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 9 is OK 10 5 16 8 4 2 1, 10 is OK >>> ================================ RESTART ================================ >>> Apply Collatz Alg. from 1 to...: 100 1, 1 is OK 2 1, 2 is OK 3 10 5 16 8 4 2 1, 3 is OK 4 2 1, 4 is OK 5 16 8 4 2 1, 5 is OK 6 3 10 5 16 8 4 2 1, 6 is OK 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 7 is OK 8 4 2 1, 8 is OK 9 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 9 is OK 10 5 16 8 4 2 1, 10 is OK 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 11 is OK 12 6 3 10 5 16 8 4 2 1, 12 is OK 13 40 20 10 5 16 8 4 2 1, 13 is OK 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 14 is OK 15 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 15 is OK 16 8 4 2 1, 16 is OK 17 52 26 13 40 20 10 5 16 8 4 2 1, 17 is OK 18 9 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 18 is OK 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 19 is OK 20 10 5 16 8 4 2 1, 20 is OK 21 64 32 16 8 4 2 1, 21 is OK 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 22 is OK 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 23 is OK 24 12 6 3 10 5 16 8 4 2 1, 24 is OK 25 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 25 is OK 26 13 40 20 10 5 16 8 4 2 1, 26 is OK 27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 27 is OK 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 28 is OK 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 29 is OK 30 15 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 30 is OK 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 31 is OK 32 16 8 4 2 1, 32 is OK 33 100 50 25 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 33 is OK 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 34 is OK 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 35 is OK 36 18 9 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 36 is OK 37 112 56 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 37 is OK 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 38 is OK 39 118 59 178 89 268 134 67 202 101 304 152 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 39 is OK 40 20 10 5 16 8 4 2 1, 40 is OK 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 41 is OK 42 21 64 32 16 8 4 2 1, 42 is OK 43 130 65 196 98 49 148 74 37 112 56 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 43 is OK 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 44 is OK 45 136 68 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 45 is OK 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 46 is OK 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 47 is OK 48 24 12 6 3 10 5 16 8 4 2 1, 48 is OK 49 148 74 37 112 56 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 49 is OK 50 25 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 50 is OK 51 154 77 232 116 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 51 is OK 52 26 13 40 20 10 5 16 8 4 2 1, 52 is OK 53 160 80 40 20 10 5 16 8 4 2 1, 53 is OK 54 27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 54 is OK 55 166 83 250 125 376 188 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 55 is OK 56 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 56 is OK 57 172 86 43 130 65 196 98 49 148 74 37 112 56 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 57 is OK 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 58 is OK 59 178 89 268 134 67 202 101 304 152 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 59 is OK 60 30 15 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 60 is OK 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 61 is OK 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 62 is OK 63 190 95 286 143 430 215 646 323 970 485 1456 728 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 63 is OK 64 32 16 8 4 2 1, 64 is OK 65 196 98 49 148 74 37 112 56 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 65 is OK 66 33 100 50 25 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 66 is OK 67 202 101 304 152 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 67 is OK 68 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 68 is OK 69 208 104 52 26 13 40 20 10 5 16 8 4 2 1, 69 is OK 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 70 is OK 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 71 is OK 72 36 18 9 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 72 is OK 73 220 110 55 166 83 250 125 376 188 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 73 is OK 74 37 112 56 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 74 is OK 75 226 113 340 170 85 256 128 64 32 16 8 4 2 1, 75 is OK 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 76 is OK 77 232 116 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 77 is OK 78 39 118 59 178 89 268 134 67 202 101 304 152 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 78 is OK 79 238 119 358 179 538 269 808 404 202 101 304 152 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 79 is OK 80 40 20 10 5 16 8 4 2 1, 80 is OK 81 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 81 is OK 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 82 is OK 83 250 125 376 188 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 83 is OK 84 42 21 64 32 16 8 4 2 1, 84 is OK 85 256 128 64 32 16 8 4 2 1, 85 is OK 86 43 130 65 196 98 49 148 74 37 112 56 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 86 is OK 87 262 131 394 197 592 296 148 74 37 112 56 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 87 is OK 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 88 is OK 89 268 134 67 202 101 304 152 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 89 is OK 90 45 136 68 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 90 is OK 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 91 is OK 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 92 is OK 93 280 140 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 93 is OK 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 94 is OK 95 286 143 430 215 646 323 970 485 1456 728 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 95 is OK 96 48 24 12 6 3 10 5 16 8 4 2 1, 96 is OK 97 292 146 73 220 110 55 166 83 250 125 376 188 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1, 97 is OK 98 49 148 74 37 112 56 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 98 is OK 99 298 149 448 224 112 56 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 99 is OK 100 50 25 76 38 19 58 29 88 44 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1, 100 is OK >>> ================================ RESTART ================================ >>> Apply Collatz Alg. from 1 to...: 10 >>> range(1,2,0.5) Traceback (most recent call last): File "", line 1, in range(1,2,0.5) TypeError: 'float' object cannot be interpreted as an integer >>> range(1,2.5,1) Traceback (most recent call last): File "", line 1, in range(1,2.5,1) TypeError: 'float' object cannot be interpreted as an integer >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> lst1 = [1, 2.4, "amir"] >>> len(lst1) 3 >>> lst1[0] 1 >>> lst1[2] 'amir' >>> lst1[len(lst1)-1] 'amir' >>> lst1[len(lst1)] Traceback (most recent call last): File "", line 1, in lst1[len(lst1)] IndexError: list index out of range >>> lst1[0] = 999 >>> lst1 [999, 2.4, 'amir'] >>> lst2 = lst1 + [1,22,"a"] >>> lst2 [999, 2.4, 'amir', 1, 22, 'a'] >>> lst2 = lst1 + 1 Traceback (most recent call last): File "", line 1, in lst2 = lst1 + 1 TypeError: can only concatenate list (not "int") to list >>> lst3 = [1,2,3,4] >>> sum(lst3) 10 >>> sum(lst1) Traceback (most recent call last): File "", line 1, in sum(lst1) TypeError: unsupported operand type(s) for +: 'float' and 'str' >>> lst1 [999, 2.4, 'amir'] >>> lst4=[1,2,[4,5]] >>> len(lst4) 3 >>> lst4[2][1] 5 >>> lst3 [1, 2, 3, 4] >>> lst3 = lst3 + [0] >>> lst3 [1, 2, 3, 4, 0] >>> lst3.sort() >>> lst3 [0, 1, 2, 3, 4] >>> list.sort(lst3) >>> lst3 [0, 1, 2, 3, 4] >>> 3 < "a" Traceback (most recent call last): File "", line 1, in 3 < "a" TypeError: unorderable types: int() < str() >>> lst1 [999, 2.4, 'amir'] >>> lst2 [999, 2.4, 'amir', 1, 22, 'a'] >>> for e in lst2: print(e*2) 1998 4.8 amiramir 2 44 aa >>> for i in range(len(lst2)): print(lst2[i]*3) 2997 7.199999999999999 amiramiramir 3 66 aaa >>> Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> How many grades? 4 Enter next grade: 90 Enter next grade: 88 Enter next grade: 50 Enter next grade: 89 >>> grades [90.0, 88.0, 50.0, 89.0] >>> ================================ RESTART ================================ >>> How many grades? 4 Enter next grade: 10 Enter next grade: 88 Enter next grade: 89 Enter next grade: 90 3 grades are above the average 69.25 >>> >>> [5*x+1 for x in [1,2,3,4] if x**2<10] [6, 11, 16] >>> ================================ RESTART ================================ >>> How many grades? 4 Enter next grade: 10 Enter next grade: 20 Enter next grade: 30 Enter next grade: 40 2 grades are above the average 25.0 >>> grades = [-1]*10 >>> grades [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1] >>> Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> >>> type(max2) >>> max2(3,4) 4 >>> x = max2("amir", "amit") >>> x 'amit' >>> 3 >= "a" Traceback (most recent call last): File "", line 1, in 3 >= "a" TypeError: unorderable types: int() >= str() >>> max2(3, "a") Traceback (most recent call last): File "", line 1, in max2(3, "a") File "C:\Documents and Settings\eladlibm\Desktop\T2__\r22_max.py", line 2, in max2 if a>=b: TypeError: unorderable types: int() >= str() >>> max2(max2(4,5),7) 7 >>> ================================ RESTART ================================ >>> >>> max2(4,3) 4 >>> x = max2(4,3) #here we replaced the return with print 4 >>> x >>> print(x) None >>>