First week of the course introduced about the use of programming tools and code repositories. Next the introduction to computer and its uses were demonstrated. We were introduced briefly about the hardware and software, application layers and programming languages.
1.What is a code repository (often also called version control system) used for?
Ans.: A code repository is a place to store all your programs and its documentations. It can be stored either locally or online. The code repository software provides the ways to maintain the various versions of the same program/software under development and keep track of all the changes being made in different versions of the program as being developed. We are using online code repository website i.e. www.github.com to manage all the program codes we going to learn and develop as part of our assignments.
2.Why is it advantageous to use a code repository?
Ans.: The main advantages of using a code repository are:
i)It provides facility to collaborate with other team members of the project
ii)It is used as backup and restore option of the project.
iii)It maintains the various different version of the project and we can to back to any older version if anything goes wrong with the current version.
iv)It also used for documentation purpose of the project concerned
3.Describe the different “layers” of Software that exist on a typical computer and explain why there are different layers of software.
Ans.: The different layers of software which exist in a typical computers are: System Software, and Application software. The system software layer is used as an interface between user and the hardware. It takes all the instructions and command from the user and convert it to machine language and get the task done by the underlying hardware. It then provide the result to user in user understandable language or format.
4.Describe what an algorithm is and explain why it is a useful “tool” to translate from a human level problem (we can think of) to a computer program.
Ans.: Algorithm is a set of instructions to solve a problem by a computer written in English language. It does not uses the usual keyword of any programming language, but write the instructions step by step in a logical manner to solve the given problem.
PRACTICAL SESSION 2
In second week we learnt about what computer program is and learnt what are computer program are made up of namely, keywords, symbols, operators and syntax. We further learnt how a high level language program is converted to machine language code which computer uses to execute the program. We were introduced about the concept of algorithms and what is importance of it during program development. We learnt how to write algorithms to solve day to day problems. Then we learnt about compilers and interpreters and how they are used to convert a high level language program to machine language (binary language). We also learnt about the various types of programming language namely, machine language, assembly language and high level languages. Then we were introduced about the basics of PYTHON language, its history, and language shell – IDLE.
We were introduced next about the statements and expressions in PYTHON and difference between them. We also learnt about the proper indentation and spacing in PYTHON program. And lastly we learnt the command INPUT which is used take input from the user.
1)Write an algorithm that describes how to make scrambled eggs, try to use control words, like IF, WHEN, UNTIL, WHILE, WAIT, AND, OR.
1.Take two eggs and break them and put in a bowl. Put some salt to taste, black pepper, red pepper as desired.
2.Beat the eggs for about half a minute in the bowl till eggs become fluffy.
3.Take a frying pan and put some oil or butter in the pan and heat it
4.Wait for butter to melt or oil to get heated
5.Put egg in the pan
6.While egg not cooked
a.Stir the eggs in the frying pan till cooked
8.If other ingredients need
a.Add other ingredients like cheese, tomatoes etc.
10.Put the cooked egg in a plate and serve hot