Skip to content

Instantly share code, notes, and snippets.

@lokeshh
Created February 5, 2020 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lokeshh/3387d32957dc9579a2aa9976e500fe20 to your computer and use it in GitHub Desktop.
Save lokeshh/3387d32957dc9579a2aa9976e500fe20 to your computer and use it in GitHub Desktop.
import time
class BmiData:
def __init__(self):
self.weight = 0
self.height = 0
def main(bmiData):
for i in range(100):
bmiData.height += 1
time.sleep(1)
import time
from bmi_cal import *
import threading
bmiData = BmiData()
threading.Thread(target=main, args=(bmiData,)).start()
while True:
print(f"Weight = {bmiData.weight}, height = {bmiData.height}")
time.sleep(3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment