Posts

Showing posts from March, 2022

#4aa: Coding in Python {LCM Calculator}

Image
x=1 while x!=0:     howMany = int(input('Enter number of numbers: '))     print()     if howMany>1:         x=0         allNumbers = []         for i in range(howMany):             EN=('Enter number #{}: '.format(i+1))             y=1             while y!=0:                                 number = int(input(EN))                 if number>1:                     y=0                     allNumbers.append(number)                 else:                     print('Retry, make sure that desired number ...

#4z: Coding in Python {Sorter}

Image
 116 times better than this garbage  . n = int(input('No of terms: ')) itema = [] for i in range(n):     t = int(input("Enter numbers: "))     itema.append(t)     def ran(di):     global want     low = di[0]         for i in (di):         if i<low:low=i       return low test1 = [] for i in range (n):     test1.append(ran(itema))     itema.remove(ran(itema)) print(test1) test1.reverse() print(test1) I would like to thank Mr. Abdul Rahmani for suggesting major changes. Download the above code from here .