1. List is an ordered form of data structure whereas dictionary is an unordered form of data structure. So when you add an item in a list it is added in a particular sequence but in dictionary the item is added randomly at any position. Dictionary stores items in key-value pairs and lists store it at iRead more

    List is an ordered form of data structure whereas dictionary is an unordered form of data structure. So when you add an item in a list it is added in a particular sequence but in dictionary the item is added randomly at any position.
    Dictionary stores items in key-value pairs and lists store it at indices.
    To access items in list, you refer to indices but in dictionaries you refer to key for accessing the stored value against it.

    See less
    • 0
  • 0

  1. A major difference between python tuple and list in python is that tuples cannot be modified (immutable) whereas lists are modifiable (mutable). Lists can use methods like append(), insert(), remove(), sort(), clear(), pop(), reverse(), index() and count() but tuples can only use the methods index()Read more

    A major difference between python tuple and list in python is that tuples cannot be modified (immutable) whereas lists are modifiable (mutable).
    Lists can use methods like append(), insert(), remove(), sort(), clear(), pop(), reverse(), index() and count() but tuples can only use the methods index() and count().

    See less
    • 0
  • 0

  1. A program has a set of executable instructions written to perform a particular task. It consists of a compiled code that can directly run on computer's operating system.

    A program has a set of executable instructions written to perform a particular task. It consists of a compiled code that can directly run on computer’s operating system.

    See less
    • 0
  • 0

  1. Though Java is a Object Oriented Programming language, it does support procedural programming as Java is evolved from Procedural programming languages.

    Though Java is a Object Oriented Programming language, it does support procedural programming as Java is evolved from Procedural programming languages.

    See less
    • 0
  • 0

  1. Class in Object Oriented Programming (OOP) is like a blueprint for an object. We define the basic structure of an object in the class. The behavior of object is also defined in a class. Object is created using the class. We pass values using the object which then behave in the way that the class isRead more

    Class in Object Oriented Programming (OOP) is like a blueprint for an object. We define the basic structure of an object in the class. The behavior of object is also defined in a class.

    Object is created using the class. We pass values using the object which then behave in the way that the class is designed.

    For example a class with the name animal may have methods like hands(), legs(), tail() defined.
    An object with the name dog can be created and referenced to class animal. Now the object dog can use the methods of class animal as its behavior.

    See less
    • 0
  • 0

  1. Break The break keyword is used in loops to avoid an infinite loop. When a condition is fulfilled, using break keywords helps exits the loop and does not enter an indefinite loop. Continue The use of continue keyword lets you skip the current iteration in loop and move to the next iteration.

    Break
    The break keyword is used in loops to avoid an infinite loop. When a condition is fulfilled, using break keywords helps exits the loop and does not enter an indefinite loop.

    Continue
    The use of continue keyword lets you skip the current iteration in loop and move to the next iteration.

    See less
    • 0
  • 0

  1. Alright so let's assume that you have a problem and you need to create an algorithm for it so as to find a solution. Firstly, you need to understand the problem in depth, its not a cakewalk to do this. When finding a description of the problem, you may face many defects as the description relies onRead more

    Alright so let’s assume that you have a problem and you need to create an algorithm for it so as to find a solution. Firstly, you need to understand the problem in depth, its not a cakewalk to do this. When finding a description of the problem, you may face many defects as the description relies on unstated assumptions, the description can be ambiguous and the description could be incomplete. Once you get the description, you shall get to its analysis. You need to work on the source of data, its availability, the rules that exist on working with that data etc. Then get to developing of the algorithm, start with development of high level algorithm, which implies that it should not just have some steps but also the underlined details. Once when you are done with the preparation of your high level data, you shall start working on refining the algorithm. You may follow Stepwise refinement, which is a process for developing a detailed algorithm by gradually adding detail to a high-level algorithm. The final step is to review the algorithm. Firstly see and determine whether or not it will solve the original problem and if you are satisfied with it then you may look for other things as well.

    See less
    • 0
  • 0

  1. With the increasing presence of algorithms on web and not forgetting how they always existed in mathematics and yes in our day to day life, we can already conclude how important they are. There are many advantages of it, firstly, it is a step-wise representation of a solution to a given problem, whiRead more

    With the increasing presence of algorithms on web and not forgetting how they always existed in mathematics and yes in our day to day life, we can already conclude how important they are. There are many advantages of it, firstly, it is a step-wise representation of a solution to a given problem, which makes it easy to understand and give a clear understanding. It is approached with a level of certainty as an algorithm uses a definite procedure. Also, it could be noticed that it is not dependent on any programming language, so it is easy to understand for anyone even without programming knowledge. It is easy to debug as every step in an algorithm has its own logical sequence. Besides that by using algorithm, the problem is broken down into smaller pieces or steps hence, it is easier for programmer to convert it into an actual program.

    See less
    • 0
  • 0

  1. If not speaking specifically then algorithms are everywhere, used all around for almost everything that exists on the web. There are examples of algorithms in a lot of fields, from computer science and mathematics to baking and cooking. To go by the definition, we know that an algorithm is a finiteRead more

    If not speaking specifically then algorithms are everywhere, used all around for almost everything that exists on the web. There are examples of algorithms in a lot of fields, from computer science and mathematics to baking and cooking. To go by the definition, we know that an algorithm is a finite list of instructions used to perform a task. Also, one of the attributes of an algorithm is that, since it is a list of instructions, there is some step-by-step process that occurs in order. So, let’s say you need to bake a cake then you will follow some ordered steps and these steps will lead you to your final product. Although, if the order of these steps are altered then I highly doubt if you will end up with the same result, if you have tried baking then you already know what I am talking about.

    See less
    • 0
  • 0