100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Other

Unit 4 assignment

Rating
-
Sold
-
Pages
39
Uploaded on
11-09-2023
Written in
2023/2024

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.

Institution
Course











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Study Level
Examinator
Subject
Unit

Document information

Uploaded on
September 11, 2023
Number of pages
39
Written in
2023/2024
Type
Other
Person
Unknown

Subjects

Content preview

Unit 4 assignment 1


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
$21.41
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
mohamedyusuf1

Get to know the seller

Seller avatar
mohamedyusuf1 Barnet college
Follow You need to be logged in order to follow users or courses
Sold
6
Member since
2 year
Number of followers
5
Documents
11
Last sold
1 year ago
Btech IT assignments Distinction

Providing btech IT assignments that are of distinction grade.

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions