FINDING GENDER

                                                 FINDING GENDER IN PYTHON        

     

                                           Today,I have made a video on finding gender with python program.

  Here is the video on it :

 


THE CODE SNIPPET IS :

                                      import time
from machine import Pin
Led_1 = Pin(0,Pin.OUT)
Led_2 = Pin(15,Pin.OUT)
Name =  input("enter your name : ")

print("Analysing.....")


for i in Name :
   last_letter = i
   time.sleep(0.5)


if last_letter == "a" or last_letter == "i" or last_letter == "y"  :
    print ('High chances of FEMALE Name ')
    Led_1.off()
    Led_2.on()
else :
    print ("High chances of MALE Name  ")
    Led_1.on()
    Led_2.off()



How this code works ? So what happens here is .... First the computer will ask you for your name .

If your name ends with a or i. Then it would tell you that it is a high chance of female name.

Otherwise it would show , high chance of male name.    

                                        

Comments