Pseudo Code on Arithmetic Operators Asked In CAPGEMINI

Duration: 10 min

This video lesson is available to enrolled students.

Return to /learn/LTI-MINDTREE-PREPARATION/coding/pseudo-codes/pseudo-code-by-yash-sir/asset-pseudo-code-on-arithmetic-operators-asked-in-capgemini after enrolling

Inside: a video lesson and guided study material.

Module outline

  1. English Comprehension/Verbal Ability: Comprehension / Reading Comprehension / Unseen Passages (Critical Reasoning) (Paragraph Questions) Vocabulary Sentence Correction (Error Correction) Sentence Completion (Fill in the blanks) Sentence Re-arrangements (Para Jumbles) (Narrative Sequencing) Subject Verb Agreement (Verb Noun Agreement) Tenses Verb Articles Preposition Conjunction Pronoun Noun Adjectives Adverb Modals Cloze Test (Cloze Passage) Active Passive Voice (Voice) Direct and Indirect Speech Sentence Construction
  2. Logical Ability: Coding Decoding Directions (Direction Test) Analogy Inequality Data Sufficiency Series (Number and Letter Series) (Numerical Relations and Reasoning) Syllogisms Seating Arrangements Puzzle Solving (Puzzles) Blood Relations Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning) Ranking, Order and Sequence Logical Sequence Of Words Data Arrangement Venn Diagram Calendar Clock
  3. Quantitative Ability: Logarithm Permutation and Combination Probability Profit and Loss Speed Time and Distance Mixture and Alligation Partnership Simple Interest and Compound Interest Percentage Ratio and Proportion (Ratios) Average Time and Work Pipe and Cistern Number System Divisibility Rules HCF LCM Algebra Powers and Exponents (Surds and Indices) Mensuration and Geometry Age Problems Data Interpretation Sequence and Series (Series)
  4. Basic Analytical Ability: Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning) Analytical Reasoning (Counting Figures Reasoning) Cubes & Dices Selection Decision Table (Decision Making)
  5. Computer Programming: Pseudo Codes Coding Questions by Yash Sir C Programming by Yash Sir Programming in C++ Java Python for Placements by Yash Sir
  6. DBMS (Computer Science): Basics of DBMS ER Diagram Relational Model & Functional Dependencies Keys & Integrity Constraints Normalization (1NF - BCNF) Transaction Management Concurrency Control Database Security & Authorization
  7. SQL (Computer Science): SQL
  8. OS (Computer Science): Introduction to OS Process Management CPU Scheduling Deadlock Process Synchronization Threads & Process Creation Memory Management Virtual Memory File Management
  9. Computer Networks (Computer Science): Introduction to CN Data Communication DLL: Access Control DLL: Flow Control DLL: Error Control DLL: Framing Data Link Layer - Ethernet Net Layer: IPv4 & Proto Net Layer: IP Addressing Net Layer:Routing Protocol Transport Layer Services TL: Congestion & UDP Application Layer Hardware basics Network Security
  10. Data Structures (Computer Science): Introduction to DS Array Stack Queue Linked List Tree Graphs Hashing
  11. OOPs (Computer Science): Object Oriented Programming (OOPS)
  12. Software Engineering (Computer Science): Fundamentals of Software Engineering Software Requirements and Quality Assurance Software Design, Estimation and Metrics Software Testing Software Maintenance and Configuration Management
  13. SVAR Conversational - Spoken English: Communication Assessment
  14. HR Interview: MR & HR Interview Preparation
  15. Coding Practice Questions: Coding Questions Bank
AI summary & chapters

AI Summary

An AI-generated summary of this video lecture.

This video is a lecture on solving a multiple-choice question (MCQ) related to pseudocode, presented by an instructor from Knowledge Gate Eduventures. The video begins with a title slide for 'PSEUDO CODE CODE MCQs' and transitions to a problem from Capgemini 2020. The core of the lecture involves analyzing a function named 'Tesla' that takes an integer 'n' as input. The function uses a while loop to process the digits of 'n' from right to left. For each digit, it calculates a power of 8 (p = 8^i) and multiplies it by the digit (r) to get a value (p*r), which is then added to a running sum 's'. The loop counter 'i' is incremented, and 'n' is divided by 10 to remove the last digit. The instructor walks through the algorithm step-by-step for the input n = 127, demonstrating the calculation of the final value of 's'. The video concludes with a 'Thanks!' slide providing contact information for the course provider.

Chapters

  1. 0:00 – 2:00 00:00-02:00

    The video opens with a title slide for 'PSEUDO CODE CODE MCQs' by Yash Jain, featuring a glowing blue keyboard. This transitions to a screen with a code snippet and the word 'PSEUDOCODE' in large white letters. The instructor then introduces a problem from Capgemini 2020, which is displayed on a screen with a Tesla charging station background. The problem asks for the value of 's' when 'n' is 127, and the code for a function named 'Tesla' is shown. The instructor begins to explain the function's logic, which involves a while loop that processes the digits of 'n'.

  2. 2:00 – 5:00 02:00-05:00

    The instructor continues to analyze the pseudocode for the 'Tesla' function. He explains that the function initializes variables 'i' and 's' to 0. The while loop runs as long as 'n' is greater than 0. Inside the loop, the last digit of 'n' is extracted using 'r = n % 10'. The variable 'p' is calculated as '8^i', and the value 'p * r' is added to the sum 's'. The loop counter 'i' is incremented, and 'n' is updated to 'n / 10' to remove the last digit. The instructor uses a blackboard to visually represent the variables 's', 'n', and 'i' and begins to trace the algorithm for the input n = 127.

  3. 5:00 – 9:46 05:00-09:46

    The instructor performs a step-by-step trace of the algorithm for n = 127. He shows the initial values: s = 0, n = 127, i = 0. In the first iteration, r = 127 % 10 = 7, p = 8^0 = 1, s = 0 + 7*1 = 7, i = 1, n = 127 / 10 = 12. In the second iteration, r = 12 % 10 = 2, p = 8^1 = 8, s = 7 + 2*8 = 23, i = 2, n = 12 / 10 = 1. In the third iteration, r = 1 % 10 = 1, p = 8^2 = 64, s = 23 + 1*64 = 87, i = 3, n = 1 / 10 = 0. The loop terminates, and the function returns s = 87. The video ends with a 'Thanks!' slide and contact information for Knowledge Gate Eduventures.

The video presents a structured, step-by-step analysis of a pseudocode problem. It begins by introducing the problem and the function's purpose, then breaks down the algorithm into its core components: initialization, loop logic, and variable updates. The instructor uses a combination of on-screen code and a blackboard to demonstrate the trace of the algorithm, making the process of calculating the final value of 's' for the input n = 127 clear and easy to follow. The key concept demonstrated is the use of a loop to process the digits of a number, where each digit is weighted by a power of 8 based on its position, which is a common pattern in number manipulation problems.

Loading lesson…