657 B
657 B
Ejercicio01:
import threading
def Hilo2():
print ('Soy el hilo 2\n')
t3 = threading.Thread(target=Hilo3)
t3.start()
def Hilo3():
print ('Soy el hilo 3 y último\n')
t2 = threading.Thread(target=Hilo2)
t2.start()
print ("Soy el Hilo 1 y primero\n")
Ejercicio02:
import threading
import time
import random
def escribePunto():
for i in range(100):
print (".", end="",flush=True)
# time.sleep(0.1)
random.uniform(0.1, 0.2)
return
print ("INICIO")
t = threading.Thread(target=escribePunto)
t.start()
for i in range(50):
print ("-", end="",flush=True)
# time.sleep(0.2)
random.uniform(0.2, 0.3)