Commits

Anonymous committed fd40500

fix examples

Comments (0)

Files changed (3)

hello.world.02.py

         n = 10
         v = random.randint(0, 9)
         
-        print("n/v (%i/%i) =  %f" % (n, v, (1.0*n)/v))
+        print( 'n/v ({0:d}/{1:d}) =  %{2:.2f}'.format( n, v, (1.0*n)/v ) )
 
 
 

hello.world.03.py

         t.start()
 
     while not all(t.is_alive() == False for t in threads): 
-        msg = [ "[+]" if t.is_alive() else "[*]" for t in threads ]
+        msg = [ "[+]" if t.is_alive() else "[-]" for t in threads ]
         print(''.join(msg))
         time.sleep(1)
 

hello.world.04.py

         t.start()
 
     while not all(t.is_alive() == False for t in threads): 
-        msg = [ "[+]" if t.is_alive() else "[*]" for t in threads ]
+        msg = [ "[+]" if t.is_alive() else "[-]" for t in threads ]
         print(''.join(msg))
         time.sleep(1)