You are on page 1of 37

Programming

• Its fun and easy to learn provided you adopt a
proper approach
• Programming languages are easy to read, quick to
learn and designed with people like you in mind

• Real experience of people who have learnt a
programming language and achieved results in
mere months, even as little as 12 weeks

Myths










I Must Be A Genius!
Testers cannot code 
I need a CS degree to code
It’s too late for me to code
Learn only the best language
Should memorize all syntaxes
I Just Can’t Write That Much Code
It takes years to learn
Start to “Think like Computer”
It is a “Languages of Computers”
Foreign and Hard to Read

Let’s Read It!!!
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

Console.Write("Enter a number: ")
Dim num As Integer = Console.ReadLine
Dim total As Integer = num
For i As Integer = 1 To num - 1
total = total * (num - i)
Next
Console.WriteLine(total.ToString)
Console.ReadLine()

Let’s Read It!!!
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

Console.Write("Enter a number: ")
Dim num As Integer = Console.ReadLine
Dim total As Integer = num
For i As Integer = 1 To num - 1
total = total * (num - i)
Next
Console.WriteLine(total.ToString)
Console.ReadLine()

Let’s Read It!!!
1. public class Factorial
2. {
3.
public static int fact( int n)
4.
{
5.
if( n == 0)
6.
return 1 ;
7.
else
8.
return n * fact(n-1);
9.
}
10.
public static void main(String[]args)
11.
{
12.
System.out.println(fact(7));
13.
}
14. }

Let’s Read It!!!
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.

#include <stdio.h>
int rec (int num);
int main()
{
int number;
int result;
printf("Enter a number: ");
scanf("%d",&number);
result = rec(number);
printf("%d! = %d\n", number, result);
return 0;
}
int rec(int num)
{
if(num == 0)
return 1;
else
return (num * rec(num-1));
}

Let Me Learn Cycling

Palindrome or Not?

12 Step Approach
1.
2.
3.
4.

Be Ready
Listen
Note Important Information
Understand
1.
2.

5.
6.
7.
8.
9.
10.
11.
12.

Questions
Clarification

Confirmation
Derive Logic
Verify Logic
Explain Logic
Write Code
Test Code
Explain Code
Optimize

12 Step Approach
1.
2.
3.
4.

Be Ready
Listen
Note Important Information
Understand
1.
2.

5.
6.
7.
8.
9.
10.
11.
12.

Questions
Clarification

Confirmation
Derive Logic
Verify Logic
Explain Logic
Write Code
Test Code
Explain Code
Optimize

12 Step Approach
1.
2.
3.
4.

Be Ready
Listen
Note Important Information
Understand
1.
2.

5.
6.
7.
8.
9.
10.
11.
12.

Questions
Clarification

Confirmation
Derive Logic
Verify Logic
Explain Logic
Write Code
Test Code
Explain Code
Optimize

Palindrome or Not?

Logical Thinking / Problem Solving
• Directions Solve the problem and indicate the best of the answer choices
given.
• Question If u > t, r > q, s > t, and t > r, which of the following must be
true?
I
u>s
II s > q
III u > r
(A) I only
(B) II only
(C) III only
(D) I and II
(E) II and III

Logical Thinking / Problem Solving
• In a sports club with 30 members, 17 play
badminton and 19 play tennis and 2 do not
play either. How many members play both
badminton and tennis?
A. 7
B. 8
C. 9
D. 10
E. 11

Cake and Knife Problem

Defective Bag?

Prime Number?!

Sum of Digits?
• Input : 22465
• Output : 19
2 + 2 + 4 + 6 + 5 = 18

Palindrome or Not?

Date Palindrome?!

Two maximum numbers in an Array
• Input : 5, 34, 78, 2, 45, 1, 99, 23
• Output : 99 and 78

Sum of Digits In Array?!
• There are 2 arrays of integers. You have to add the
those integers and keep it in 3rd array. There is one
condition, if the sum is a 2 digit number, split that
number into single digit and other condition is if any of
the array integer is left then print that number

• Input:
{1,2,3,4,5,6}
{2,3,4,5,6,7,8}
Output:
{3,5,7,9,1,1,1,3,8}

Road Ahead

https://www.codecademy.com/learn/learn-java

https://www.lynda.com/

http://stackoverflow.com/

https://www.codeschool.com/courses

http://www.geeksforgeeks.org/

https://www.careercup.com/

http://www.mathsisfun.com/puzzles/measuring-puzzles-index.html

http://www.indiabix.com/logical-reasoning/logical-problems/

First Dating Experience

http://goo.gl/forms/mVhkKWo8mo