def kbtb(a,c): a=c/10000000000+c%10000000000 print(a) def kbpb(a,c): a=c/1000000000000+c%1000000000000 print(a) def kbb(a,c): a=c*8000 print(a) def kbgb(a,c): a=c/10000000000+c%10000000000 print(a) def kbmb(a,c): a=c/10000000+c&10000000 print(a) def kbby(a,c): a=c*1000 print(a) def tbkb(b,c): c=b/10000000000+b%10000000000 print(c) def pbkb(b,c): c=b/1000000000000+b%1000000000000 print(c) def bkb(b,c): c=b*8000 print(c) def gbkb(b,c): c=b/10000000000+b%10000000000 print(c) def mbkb(b,c): c=b/10000000+b&10000000 print(c) def bykb(b,c): c=b*1000 print(c) start=input("Do you want to start the program?(y/n)").strip() if start=="y" or start=="Y": while True: q=input("What do you want to convert (KB,B,MB,GB,bits,TB,PB)?").strip() w=input("What do you want to convert to (KB,B,MB,GB,bits,TB,PB)?").strip() b=int(input("How much you want to convert?").strip()) c=b a=0 if q==w: print(b,w) elif q=="KB" and w=="TB": kbtb(a,b) print(a) elif q=="KB" and w=="PB": kbpb(a,b) elif q=="KB" and w=="B": kbby(a,b) elif q=="KB" and w=="GB": kbgb(a,b) elif q=="KB" and w=="MB": kbmb(a,b) elif q=="KB" and w=="bits": kbb(a,b) elif q=="TB" and w=="KB": tbkb(b,c) elif q=="TB" and w=="PB": tbkb(b,c) kbpb(a,c) elif q=="TB" and w=="B": tbkb(b,c) kbby(a,c) print("A doua valoare este conversia.") elif q=="TB" and w=="GB": tbkb(b,c) kbgb(a,c) print("A doua valoare este conversia.") elif q=="TB" and w=="MB": tbkb(b,c) kbmb(a,c) print("A doua valoare este conversia.") elif q=="TB" and w=="bits": tbkb(b,c) kbb(a,c) print("A doua valoare este conversia.") elif q=="PB" and w=="KB": pbkb(b,c) elif q=="PB" and w=="TB": pbkb(b,c) kbtb(a,c) print("A doua valoare este conversia.") elif q=="PB" and w=="B": pbkb(b,c) kbby(a,c) print("A doua valoare este conversia.") elif q=="PB" and w=="GB": pbkb(b,c) kbgb(a,c) print("A doua valoare este conversia.") elif q=="PB" and w=="MB": pbkb(b,c) kbmb(a,c) print("A doua valoare este conversia.") elif q=="PB" and w=="bits": pbkb(b,c) kbb(a,c) print("A doua valoare este conversia.") elif q=="B" and w=="KB": bykb(b,c) elif q=="B" and w=="PB": bykb(b,c) kbpb(a,c) print("A doua valoare este conversia.") elif q=="B" and w=="TB": bykb(b,c) kbtb(a,c) print("A doua valoare este conversia.") elif q=="B" and w=="GB": bykb(b,c) kbgb(a,c) print("A doua valoare este conversia.") elif q=="B" and w=="MB": bykb(b,c) kbmb(a,c) print("A doua valoare este conversia.") elif q=="B" and w=="bits": bykb(b,c) kbb(a,c) print("A doua valoare este conversia.") elif q=="GB" and w=="KB": gbkb(b,c) elif q=="GB" and w=="PB": gbkb(b,c) kbpb(a,c) print("A doua valoare este conversia.") elif q=="GB" and w=="B": gbkb(b,c) kbby(a,c) print("A doua valoare este conversia.") elif q=="GB" and w=="TB": gbkb(b,c) kbgtb(a,c) print("A doua valoare este conversia.") elif q=="GB" and w=="MB": gbkb(b,c) kbmb(a,c) print("A doua valoare este conversia.") elif q=="GB" and w=="bits": gbkb(b,c) kbb(a,c) print("A doua valoare este conversia.") elif q=="MB" and w=="KB": tbkb(b,c) elif q=="MB" and w=="PB": mbkb(b,c) kbpb(a,c) print("A doua valoare este conversia.") elif q=="MB" and w=="B": mbkb(b,c) kbby(a,c) print("A doua valoare este conversia.") elif q=="MB" and w=="GB": mbkb(b,c) kbgb(a,c) print("A doua valoare este conversia.") elif q=="MB" and w=="TB": mbkb(b,c) kbtb(a,c) print("A doua valoare este conversia.") elif q=="MB" and w=="bits": mbkb(b,c) kbb(a,c) print("A doua valoare este conversia.") elif q=="bits" and w=="KB": tbkb(b,c) elif q=="bits" and w=="PB": bkb(b,c) kbpb(a,c) print("A doua valoare este conversia.") elif q=="bits" and w=="B": bkb(b,c) kbby(a,c) print("A doua valoare este conversia.") elif q=="bits" and w=="GB": bkb(b,c) kbgb(a,c) print("A doua valoare este conversia.") elif q=="bits" and w=="MB": bkb(b,c) kbmb(a,c) print("A doua valoare este conversia.") elif q=="bits" and w=="TB": bkb(b,c) kbtb(a,c) print("A doua valoare este conversia.") else: if start=="n" or start=="N": print("Ok see you later!!")