Monday, 5 February 2018

Python List part1 - Day2

  • there are different types of sequence type in python,list is one of them
  • list is a constructor,if you assign the list to other list it holds the same memory
  • check how sorted and .sort functions work in the code block below
  •   
    # ipaddress = input("enter a ip address \n")
    # print (ipaddress.count("."))
    #
    # parrot_list = ["no more","a stiff"]
    # print (parrot_list)
    # parrot_list.append("green")
    # print (parrot_list)
    #
    # for var in parrot_list:
    #     print (var)
    #
    # evenno = [2,4,4,6,8]
    # odd = [1,3,5,7]
    #
    # print (evenno + odd)
    # print (sorted(evenno + odd))
    # numbers = evenno + odd
    # #if u try the below code it wont return the sorted values,
    # #because it will update the list and returns none as result
    # #you can use sorted function if it has to be sorted at the time,but not
    # #the original list itself
    # # print (numbers.sort())
    # numbers.sort()
    # print (numbers)
    # unsortednos = evenno + odd
    # sortednos = (sorted(evenno + odd))
    #
    # #comparison wont be equal even if we have the same list items but in different order
    # if sortednos == unsortednos:
    #     print ("equal")
    # else:
    #     print ("not equal")
    #
    #
    # if sortednos == sorted(unsortednos):
    #     print ("equal")
    # else:
    #     print ("not equal")
    
    # list_1= []
    # list_2 = list()
    # print ("list1 : {}".format(list_1))
    # print ("list2 : {}".format(list_2))
    #
    # if list_1 == list_2:
    #     print ("equal")
    # else:
    #     print ("not equal")
    #
    # print (list("welcome to the world of lists"))
    
    #list is a constructor
    # evenno = [2,4,6]
    # anotherevenno = evenno
    # print(anotherevenno is evenno)
    # anotherevenno.sort(reverse=True)
    # #below will print the same ,although we changed the different list,because
    # #they are same
    # print(evenno)
    #
    #
    # evenno1= [2,4,6]
    # anotherevenno1 = list(evenno1)
    # print(anotherevenno1 is evenno1)
    # print(anotherevenno1 == evenno1)
    # anotherevenno.sort(reverse=True)
    # #below will print different ,since they are 2 different list
    # print(evenno1)
    
    even1= [2,4,6,8,10]
    odd1= [1,3,5,7,9]
    
    allnos = [even1,odd1]
    print(allnos)
    
    for numberset in allnos:
        print(numberset)
    
        for val in numberset:
            print(val)
      
    

    Sunday, 4 February 2018

    Started Python and Continued - Day1


  • Subscribed to Udemy Python Course
  • Installed Intellij

  • Coded using For loop,While Loop
  • Number Game,Direction Game

  •   
    # for i in [10]:
    #     print ("now the value of i is {}".format(i))
    
    # i = 0
    # while i <10:
    #     print ("now the value of i is {}".format(i))
    #     i = i+1
    #
    # #good example for while loop is below
    # exitoptions = ["east","northeast"]
    # youroption = ""
    # while youroption not in exitoptions:
    #     youroption = input("please enter your exit direction \n")
    #     if youroption =="quit":
    #         print("game over")
    #         break
    # else:
    #     print("aren't you glad that you are out from there")
    
    # Guess number game using if
    
    # import random
    # highest = 10
    # random = random.randint(1,highest)
    # # print(random)
    # answer = 1
    # answer = int(input ("Guess any number between 1 and {} \n".format(highest)))
    # if (answer==random):
    #     print("you guessed it corectly  \n")
    # elif (answer>random):
    #     answer = int(input("guess lesser no \n"))
    #     if (answer==random):
    #         print("you guessed it corectly  \n")
    # elif (answer<random):
    #     answer = int(input("guess higher no \n"))
    #     if (answer==random):
    #         print("you guessed it corectly \n")
    
    # Guess number game using whileloop
    
    import random
    # highest = 10
    # random = random.randint(1,highest)
    # print(random)
    # guessallowed = 5
    # guesstime = 1
    # guessedno = int(input("guess a no between 1 and {}\n".format(highest)))
    # while guesstime <guessallowed and random!=guessedno:
    #     guessedno = int(input("guess one more time\n"))
    #     guesstime = guesstime + 1
    # if (random == guessedno):
    #     print("you guessed it at {}- guess".format(guesstime))
    # else:
    #     print("sorry")
      
    

    Saturday, 3 February 2018

    Power Of Consistency

    IF YOU WANT TO BE TAKEN SERIOUSLY BE CONSISTENT


  • No one is born genius,some might have high IQ.
  • But rest go to the top just by sheer practice.

  • Daily Practice
  • 1 Ted Talk/Blog [related to data-science,machine learning deep learning]
  • 1 Hour Python Practice
  • 1/2 hour of new sql concept
  • 1/2 hour of math a day
  • Atleast 1 Fruit a day
  • 20 Pushups A day
  • 1 Cycle Ride A day
  • 1 Blog A day
  • 10 Mins of calmness a day
  • 10 mins of goal remembrance a day

  • Monday, 3 July 2017

    Lets Learn English

  • Epiphany - A Sudden intuitive perception or insight into something

  • Quotes That I Love


    Doing the same thing again and again,but expecting different results every time -Height of insanity


    Every Day above the Earth is the Good Day.