Introduction to Programming — Chapter 01

Saketh G
8 min readOct 22, 2022

Links to previous chapters
Chapter 0 — Overview : click here

Chapter 1 : Understanding Data — Inputs & Outputs

To review from previous chapter: For a computer to perform a task, it requires some data called inputs, which it then converts into outputs by following set of instructions. Enough of explaination, let us now understand what these data actually are by looking at few tasks.

Task 1 — Adding two numbers

In this task, we want a computer to perform simple addition of two numbers for us. Here, the two integers that we provide computer are the inputs, the set of instructions that computer follow to add two numbers is the program and sum of the two numbers is the output.

Input : 2,3
Output : 5

Task 2 — Displaying ‘n’ numbers

The task for the computer is that if we give a number ’n’, it should display numbers 1 to n on the monitor.

Input : 10
Output : 1,2,3,4,5,6,7,8,9,10

Task 3 — Count the letters in a word

The task for the computer is that if we give any word to it, it should count the letters in the word

Input : India
Output : 5

Task 4 — Even or Odd

--

--

Saketh G
0 Followers

Co-Founder @ pickupsmart | Studying M.Sc. Computer Science from TUM | Learn programming together | Support @ https://codesmartwithsaketh.medium.com/membership