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
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller mohamedyusuf1. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $19.99. You're not tied to anything after your purchase.