Posts

Showing posts from May, 2019

#4h: Codding in Python {FUTURE GAME}

Image
#FUTURE_GAME import random print("This games predicts your stupid future and it can come very bad or good") z=str(input("Enter your name: ")) job=['Banker','Millioniare','Begger','Lawyer','Industrialist','Sportsperson','Teacher','x'] sal=['1000000','69','1','696969696969','10000','100','6900000000000000','x'] clothes=['Shirt pant','(Formal) Shirt-pant','Underwear','Salwar-suit','One-piece','Towel','Nothing','x'] vehicle=['Car','Truck','Cycle','Bullock-cart','Rickshaw','Tempo','Bus','Donkey','Legs','x','Super-fast car'] gender=['Mrs','Mr','Gay','x'] home=['Caravan','Forest','Rent','Flat','Footpath','Bunglow

#4g: Codding in Python{HCF FINDER}

Image
#hcf_finder a=int(input("Enter 1st number: ")) b=int(input("Enter 2nd number: ")) z=max(a,b) lst=[] for i in range(z,0,-1):     if a%i==0 and b%i==0:         lst.append(i)   m=max(lst) print("HCF is ",m) Download  CODES here. CLICK HERE  for online Python.

#4f:Codding in Python:{AVERAGE AND SUM FINDER}

Image
#AverageAndSumFinder print("Press 1 to find sum and press 2 to find average.") z=int(input("Enter choice")) if z==1:     lst=[]     n=int(input("Enter total number values: "))     for i in range (n):         x=int(input("Enter the next value: "))         lst.append(x)     print("Values are ",lst)     print("Total sum is ",sum(lst)) if z==2:     lst=[]     n=int(input("Enter total number values: "))     for i in range (n):         x=int(input("Enter the next value: "))         lst.append(x)     s=sum(lst)     print("Values are ",lst)     print("Total sum is ",s)     avg=s/n     print("Average is ",avg) Downloadable  CODES  are here. CLICK HERE  for online Python.

#4e. Coding in python. [PRIME NUMBER CHECKER]

#prime number tester a=int(input("Enter number:")) for b in range(2,a):     if a%b==0 :         print ( a , "is not prime number.")         break else:     print ( a , "is  prime number." ) Download  CODES  here. CLICK HERE  for online Python.

#4d. Codding in python {LAWS OF MOTION}

Image
#Laws of Motion. print ("If variables are initial velocity,Final velocity,Duration of time & Acceleration in one equation press 1") print ("If variables are Distance,Initial velocity,Duration of time & Acceleration in one equation press 2") z=int(input("Enter choice:")) if (z==1):     print("Find 'Acceleration' press 1"           "Find  'Duration of time' press 2."           "Find 'Initial velocity' press 3."           "Find  'Final velocity' press 4.")     y=int(input("Enter choice:"))     if(y==1):         u=int(input("Enter initial velocity: "))         v=int(input("Enter final velocity: "))         t=int(input("Enter duration of time: "))         a=(v-u)/t         print("Acceleration produced is %d"%(a))     if(y==2):         u=int(input("Enter initial velocity: "))         v=int(input("En

#4c. Codding in Python {NO. OF NOTES FINDER}.

Image
#money... n=int(input("Enter number of different types of notes:")) if(n==2):     a=int(input("Enter Total cost:" ))     z=int(input("Enter 1st type of note (Value):"))     y=int(input("Enter 1st type of note's ratio's part:"))     x=int(input("Enter 2nd type of note (Value):"))     w=int(input("Enter 2nd type of note's ratio's part:"))     b=(a)/((z*y)+(w*x))     print ("Number of 1st type of note=",b*y )     print ("Number of 2nd type of note=",b*w ) if(n==3):     a=int(input("Enter Total cost:" ))     z=int(input("Enter 1st type of note (Value):"))     y=int(input("Enter 1st type of note's ratio's part:"))     x=int(input("Enter 2nd type of note (Value):"))     w=int(input("Enter 2nd type of note's ratio's part:"))     v=int(input("Enter 3rd type of note (Value):"))     u=int(input("Enter

#4b. Codding in Python {UNIT CONVERTER}.

Image
#Unit Converter print ("Press 1 for Temperature converter;Press 2 for cm-inch converter; Press 3 for mile-km converter") a=int(input("Enter choice:")) if (a==1):     print("Press 1 for C - F; Press 2 for F - K; Press 3 for C - K")     b=int(input("Enter choice:"))     if(b==1):         print("Press 1 for C - F; Press 2 for F - C")         z=int(input("Enter choice:"))         if(z==1):             c=int(input("Enter value in C :"))             f=(9*c-160)/5             print (f,"F")         if(z==2):             g=int(input("Enter value in F :"))             d=(5*g+160)/9             print (d,"C")         if(z>2) or (z<1):             print("Wrong choice !! Retry")       if(b==2):         print("Press 1 for K - F; Press 2 for F - K")         z=int(input("Enter choice:"))         if(z==1):             k=int(input("Enter v

#4a. Codding in Python {LCM FINDER FOR NUMBER}.

Image
#LCM Calculator a=int(input("First Number:")) b=int(input("Second Number:")) for c in range(1, a*b +1):     if c%a==0 and c%b==0:         print ("LCM is", c)         break Download  CODES  here. CLICK HERE  for online Python.