|
62 | 62 | "\n", |
63 | 63 | "while not guess_ok_mark:\n", |
64 | 64 | "\n", |
65 | | - " cur_guess = int((min+max)/2)\n", |
| 65 | + " cur_guess = int((min + max) / 2)\n", |
66 | 66 | " print('I guess:', cur_guess)\n", |
67 | 67 | " human_answer = input('Please tell me big or small:')\n", |
68 | 68 | " if human_answer == 'big':\n", |
|
185 | 185 | }, |
186 | 186 | { |
187 | 187 | "cell_type": "code", |
188 | | - "execution_count": 4, |
| 188 | + "execution_count": 13, |
189 | 189 | "metadata": { |
190 | 190 | "collapsed": false |
191 | 191 | }, |
|
194 | 194 | "name": "stdout", |
195 | 195 | "output_type": "stream", |
196 | 196 | "text": [ |
197 | | - "time: 0.016383886337280273\n" |
| 197 | + "time: 0.011875152587890625\n" |
198 | 198 | ] |
199 | 199 | } |
200 | 200 | ], |
|
395 | 395 | }, |
396 | 396 | { |
397 | 397 | "cell_type": "code", |
398 | | - "execution_count": 11, |
| 398 | + "execution_count": 14, |
399 | 399 | "metadata": { |
400 | 400 | "collapsed": false |
401 | 401 | }, |
|
404 | 404 | "name": "stdout", |
405 | 405 | "output_type": "stream", |
406 | 406 | "text": [ |
407 | | - "2016-12-10 09:02:14.519363\n", |
408 | | - "2016-12-10 19:02:14.519363\n" |
| 407 | + "2016-12-22 13:00:56.872066\n", |
| 408 | + "2016-12-22 23:00:56.872066\n" |
409 | 409 | ] |
410 | 410 | } |
411 | 411 | ], |
|
422 | 422 | }, |
423 | 423 | { |
424 | 424 | "cell_type": "code", |
425 | | - "execution_count": 12, |
| 425 | + "execution_count": 15, |
426 | 426 | "metadata": { |
427 | 427 | "collapsed": false |
428 | 428 | }, |
|
431 | 431 | "name": "stdout", |
432 | 432 | "output_type": "stream", |
433 | 433 | "text": [ |
434 | | - "2016-12-10 09:02:20.223590\n", |
435 | | - "2016-12-10 19:22:10.223590\n" |
| 434 | + "2016-12-22 13:01:14.431849\n", |
| 435 | + "2016-12-22 23:21:04.431849\n" |
436 | 436 | ] |
437 | 437 | } |
438 | 438 | ], |
|
484 | 484 | }, |
485 | 485 | { |
486 | 486 | "cell_type": "code", |
487 | | - "execution_count": 9, |
| 487 | + "execution_count": 16, |
488 | 488 | "metadata": { |
489 | 489 | "collapsed": false |
490 | 490 | }, |
|
494 | 494 | "output_type": "stream", |
495 | 495 | "text": [ |
496 | 496 | "110.0\n", |
497 | | - "120.0\n" |
| 497 | + "120.0\n", |
| 498 | + "130.0\n" |
498 | 499 | ] |
499 | 500 | } |
500 | 501 | ], |
|
505 | 506 | " return money + money * rate\n", |
506 | 507 | "\n", |
507 | 508 | "print(cal_0(100))\n", |
508 | | - "print(cal_0(100,0.2))" |
| 509 | + "print(cal_0(100,0.2))\n", |
| 510 | + "print(cal_0(rate=0.3,money=100))" |
509 | 511 | ] |
510 | 512 | }, |
511 | 513 | { |
|
0 commit comments