0% found this document useful (0 votes)
135 views5 pages

Logic Building Hour Plan

The document outlines a 10 day programming learning plan focused on learning fundamentals like data types, conditional statements, loops, and operations like division and modulo. Each day introduces new concepts and problems to solve on an online evaluation tool called Mettl. Students are expected to demonstrate their understanding by writing programs to solve problems related to conditions, loops, number operations, and logic building. The objectives and practice tests are provided to guide students in building their programming skills over the 10 days.

Uploaded by

Shalini Kumaran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
135 views5 pages

Logic Building Hour Plan

The document outlines a 10 day programming learning plan focused on learning fundamentals like data types, conditional statements, loops, and operations like division and modulo. Each day introduces new concepts and problems to solve on an online evaluation tool called Mettl. Students are expected to demonstrate their understanding by writing programs to solve problems related to conditions, loops, number operations, and logic building. The objectives and practice tests are provided to guide students in building their programming skills over the 10 days.

Uploaded by

Shalini Kumaran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

 

Day- Objective of Day1 and Day2 : Learn the basics of the programming


1 language
 
During the first two days of PBL, the students should have learnt the
fundamentals of programming language and should be comfortable with
the basic programming constructs.
Day- - conditional statements
2 - looping constructs
- data types
 
  By the end of Day2 :Students should be able to demonstrate their
  understanding of ‘conditions’ and ‘loops’ by being able to write the below
programs
 
Programs to demonstrate learner’s understanding of “Conditional statements”
• Write a program to accept a number N and print whether it is positive, negative
or zero
• Write a program to accept two numbers and print the greater value of the two
• Write a program to accept a number N and print whether the number is EVEN or
ODD
• Write a program to accept two numbers and print whether their sum is EVEN or
ODD
 
Programs to demonstrate learner’s understanding of “Looping constructs”
• Write a program to print all numbers from 1 to 100 i.e. 1 2 3 4 5 6 7 . . . 98 99
100
• Write a program to print alternate numbers starting from 1 to 99 i.e. 1 3 5 7 9 11
13 . . . 95 97 99
• Write a program to print alternate numbers starting from 0 to 100 i.e. 0 2 4 6 8
10 12 . . . 96 98 100
• Write a program to print all numbers backwards from 100 to 0 i.e. 100 99 98 97
96 . . . 4 3 2 1 0
• Write a program to print numbers backwards from 100 to 1 by skipping 2
numbers i.e. 100 97 94 91 88 85 82 79. . . 22 19 16 13 10 7 4 1
  Students who have NOT been able to complete the above mentioned programs
Day- on day-2, MUST complete them on day-3.
3  
Objective of Day3: Learn the use of division / and mod % operations to
solve problems
 
Solve the below questions using the respective IDE (Eclipse for Java,  Visual
studio for C#,  vi for C/C++)
         Is Even?
Write a function to find whether the given input number is Even.
If the given number is even, the function should return 2 else it should
return 1.
Note: The number passed to the function can be negative, positive or
zero. Zero should be treated as Even.
 
         Is Odd?
Write a function to find whether the given input number is Odd.
If the given number is odd, the function should return 2 else it should
return 1.
Note: The number passed to the function can be negative, positive or
zero. Zero should NOT be treated as odd.
 
         Return last digit of the given number
Write a function that returns the last digit of the given number.
Last digit is being referred to the least significant digit i.e. the digit in the
ones (units) place in the given number.
The last digit should be returned as a positive number.
for example,
if the given number is 197, the last digit is 7
if the given number is -197, the last digit is 7
 
         Return second last digit of the given number
Write a function that returns the second last digit of the given number.
Second last digit is being referred to the digit in the tens place in the given
number.
for example,
if the given number is 197, the second last digit is 9
 
Note1 - The second last digit should be returned as a positive number.
i.e. if the given number is -197, the second last digit is 9
 
Note2 - If the given number is a single digit number, then the second last
digit does not exist. In such cases, the function should return -1.
i.e. if the given number is 5, the second last digit should be returned as -1
 
         Sum of last digits of two given numbers
Rohit wants to add the last digits of two given numbers.
For example,
If the given numbers are 267 and 154, the output should be 11.
Below is the explanation -
Last digit of the 267 is 7
Last digit of the 154 is 4
Sum of 7 and 4 = 11
 
Write a program to help Rohit achieve this for any given two numbers.
 The prototype of the method should be -
int addLastDigits(int input1, int input2);
where input1 and input2 denote the two numbers whose last digits are to
be added.
 
Note: The sign of the input numbers should be ignored.
i.e.
if the input numbers are 267 and 154, the sum of last two digits should be
11
if the input numbers are 267 and -154, the sum of last two digits should be
11
if the input numbers are -267 and 154, the sum of last two digits should be
11
if the input numbers are -267 and -154, the sum of last two digits should
be 11
 
 
Objective of Day4: Learn the usage of the mettl tool
 
Mettl is an automated evaluation tool for coding tests.
Students are advised to read the “Mettl User Guide” to learn the usage of the
tool..
 
Solve the below questions on mettl
Note – These are same questions as day-3 questions. The focus on day-4 is to
learn the usage of mettl.
Day- Question Title Mettl Practice Test Link
4 Is Even? https://tests.mettl.com/authenticateKey/2bd025dc
Is Odd? https://tests.mettl.com/authenticateKey/dbdac2a9
Return last digit of https://tests.mettl.com/authenticateKey/454f012b
the given number
Return second last https://tests.mettl.com/authenticateKey/9f87004e
digit of given number
Sum of last digits of https://tests.mettl.com/authenticateKey/783a1fcf
two given numbers
 
 
Day-  
5 Objective of Day5: Learn the use of division / and mod % operations to
solve problems
 
Question Title Mettl Practice Test Link
Is N an exact multiple https://tests.mettl.com/authenticateKey/36c4ef58
of M?
Of given 5 numbers, https://tests.mettl.com/authenticateKey/8edbe922
how many are even?
Of given 5 numbers, https://tests.mettl.com/authenticateKey/67147bd5
how many are odd?
Of 5 numbers, how https://tests.mettl.com/authenticateKey/607636d7
many are even or
odd?
 
Logic building approach: Read the document “An Approach to Logic Building”
(mainly section-B) available in the “Logic Building” link in PBLApp. It suggests a
“Divide-and-Conquer” approach to be followed by beginners while developing
logic. Students are expected to read the document carefully and follow the
approach while solving all subsequent logic building problems.
 
 
 
Objective of Day6: Learn to solve math based number problems (will
require loops and maths)
 
Question Title Mettl Practice Test Link
Day-
Is Prime? https://tests.mettl.com/authenticateKey/b1efaa3d
6
Factorial of a number https://tests.mettl.com/authenticateKey/8c1f2ae
Nth Fibonacci https://tests.mettl.com/authenticateKey/f390cadf
Nth Prime https://tests.mettl.com/authenticateKey/34fdaa41
 
 
 
Objective of Day7: Learn to solve math based number problems (will
require loops and maths)
 
Question Title Mettl Practice Test Link
Number of Primes in https://tests.mettl.com/authenticateKey/87c41143
Day-
a specified range
7
All Digits Count https://tests.mettl.com/authenticateKey/ed6b4da
Unique Digits Count https://tests.mettl.com/authenticateKey/b7aac4a5
Non-Repeated Digits’ https://tests.mettl.com/authenticateKey/e46500f5
Count
 
 
   
Day- Objective of Day8: Learn to solve number based problems (will require
8 loops)
 
Question Title Mettl Practice Test Link
digitSum : sum of all https://tests.mettl.com/authenticateKey/ab1d60cc
digits in N
digitSum even: sum of https://tests.mettl.com/authenticateKey/b55d1714
even digits in N
digitSum odd: sum of https://tests.mettl.com/authenticateKey/738fdee0
odd digits in N
digitSum opt: sum of https://tests.mettl.com/authenticateKey/a05abbcf
even or odd digits
 
 
 
Objective of Day9: Learn to solve number based problems
 
Question Title Mettl Practice Test Link
Is Palindrome https://tests.mettl.com/authenticateKey/28c41d9d
Number?
Day- Is Palindrome https://tests.mettl.com/authenticateKey/f4fdb02
9 Possible?
Create PIN using https://tests.mettl.com/authenticateKey/be582d9f
alpha, beta, gamma
Weight of a hill https://tests.mettl.com/authenticateKey/d612c0e6
pattern
 
 
 
Objective of Day10: Learn to solve number & string based problems
 
Question Title Mettl Practice Test Link
Return second word https://tests.mettl.com/authenticateKey/4a72723f
Day-
in Uppercase
10
is Palindrome (string) https://tests.mettl.com/authenticateKey/ffe8042
weight of string https://tests.mettl.com/authenticateKey/387952fc
Most Frequent Digit https://tests.mettl.com/authenticateKey/916310b8
 
 
 

You might also like