while 1: a = 'NaCO3 + 2HCl -> 2NaCl + H2O + CO2' b = 'Pb(NO3) + 2Kl -> Pbl2 + 2KNO3' c = 'Zn + 2HCl -> ZnHCl2 + H2' aa = input("What's the WE for Sodium carbonate + Hydrochloric acid? ") if aa == a: print('correct!') else: print('no') bb = input("What's the WE for Pottasium iodide + Lead nitrate? ") if bb == b: print('correct!') else: print('no') cc = input('What\'s the WE for Hydrochloric acid + Zinc metal? ') if cc == c: print('correct!') else: print('no')
Python | Revision test | Chemistry
Hopefully this will help me