This is the unit 4 assignment 1 programming document which goes over programming concepts and it has extensive material regarding this matter and its of a distinction grade.
Contents
Computational thinking.........................................................................................................................1
Principles of computer programming....................................................................................................9
Principles of software design...............................................................................................................18
Analyse: How computational thinking skills can impact software design and the quality of the
software applications produced (M1)..................................................................................................20
References...........................................................................................................................................37
Computational thinking
Programmers utilise this technique to break down challenges into manageable, simpler chunks when
tackling problems so that they can be better understood. Then, in order to maximise efficiency by
developing shortcuts that can be repeated and compounded, they look for patterns inside or
between these sub problems. (pattern recognition). Programmers use abstraction to broaden the
scope of the issue while ignoring the traits of patterns that are useless and concentrating on the
ones that are. They also employ pattern generalisation to identify elements that appear in multiple
patterns. These are used by programmers as they provide solutions to issues.
Algorithms:
A technique or process used to solve a problem is known as a programming algorithm. It is based on
carrying out a series of predetermined actions that, when combined, indicate how to carry out a
task, and your computer will always carry out that task in that same manner. An algorithm operates
by following a set of input-based steps. It will see a result, also referred to as an output, when it has
followed all the inputs. Algorithms are step-by-step instructions for solving a problem. They are used
to solve problems in a logical and systematic manner, and are an essential part of computational
thinking.
Here is an example of an algorithm for finding the maximum value in an array of numbers:
,This algorithm starts by setting the max variable to the first element of the array. It then loops
through the rest of the elements in the array, comparing each element to the current value of max.
If the current element is greater than max, it updates the value of max. Finally, it returns the value of
max, which is the maximum value in the array
Logic:
A programming paradigm that is founded on the ideas of mathematical logic is known as logic
programming. Programs in logic programming are made up of a set of rules and facts that specify the
connections and restrictions between the entities in a problem domain. The primary concept behind
logic programming is that the system employs logical inference to arrive at conclusions and solve
issues after the programmer establishes the relationships between entities in the problem domain.
To put it another way, the programme formulates the issue in terms of facts and rules, and then the
system automatically decides the answer by invoking these facts and rules.
An example of a program that defines the relationship between people can be seen below:
,In order to identify each person's gender in this example, we define the parent-child connection and
use the male and female predicates. Then, using terminology similar to Prolog, we define the father
and mother relationships.
Finally, we conduct a knowledge base search by requesting the mother of tom. A generator of
answers that satisfies the question is the result of the query () function. The result in this situation
will be:
, Iteration:
Iterative refers, notably in programming, to the repetition of a set of instructions or code to produce
a particular outcome. Circular or evolutionary development are other names for iterative
development. An iteration is a single repetition of the sequence where all stages are carried out in
the specified order. It is claimed that the computer iterates through a loop if the sequence of
instructions is carried out repeatedly. Iterations and loops are used in almost all computer
programmes to carry out particular tasks and offer answers to issues. A fundamental idea in
programming and it enables effective and scalable solutions to issues involving the repetition of a
series of actions on a set of data. Iteration structures come in a variety of forms, including "for"
loops, "while" loops, and "do-while" loops. A counter variable that is either increased or decreased
each time the loop is executed controls how many times the loop iterates in a "for" loop. In a "while"
loop, the loop's iteration is determined by a condition that has to be met in order for it to continue.
A "do-while" loop always executes at least once, no matter what the circumstance. Iterations makes
algorithms easier by specifying that some phases will repeat unless instructed otherwise. As a result,
designing algorithms becomes quicker and easier because fewer pointless steps are required.
Numerous programming activities, including data processing, user input validation, and algorithms
for searching and sorting, use iteration. It is a crucial tool for creating maintainable, effective code,
which is necessary for creating sophisticated software systems.
An example of iteration being used in python:
The for loop in this illustration uses the range function to run over the values from 1 to 5. The loop
executes five times, outputting the value of the variable i (which has the values 1, 2, 3, 4, and 5) after
each iteration.
Data representation:
Data representation is the process of transforming information into a form that can be stored and
manipulated by a computer. Computers store and process data in binary format, using the digits 0
and 1 to represent the values of on and off, or true and false, respectively. Data can be anything,
including a number, a name, musical notes, or the colour of an image. The way that we stored,
processed, and transferred data is referred to as data representation. Users can utilise any kind of
Voordelen van het kopen van samenvattingen bij Stuvia op een rij:
Verzekerd van kwaliteit door reviews
Stuvia-klanten hebben meer dan 700.000 samenvattingen beoordeeld. Zo weet je zeker dat je de beste documenten koopt!
Snel en makkelijk kopen
Je betaalt supersnel en eenmalig met iDeal, creditcard of Stuvia-tegoed voor de samenvatting. Zonder lidmaatschap.
Focus op de essentie
Samenvattingen worden geschreven voor en door anderen. Daarom zijn de samenvattingen altijd betrouwbaar en actueel. Zo kom je snel tot de kern!
Veelgestelde vragen
Wat krijg ik als ik dit document koop?
Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.
Tevredenheidsgarantie: hoe werkt dat?
Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.
Van wie koop ik deze samenvatting?
Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper mohamedyusuf1. Stuvia faciliteert de betaling aan de verkoper.
Zit ik meteen vast aan een abonnement?
Nee, je koopt alleen deze samenvatting voor €19,19. Je zit daarna nergens aan vast.