Code-Find Percentage
Duration: 11 min
This video lesson is available to enrolled students.
Inside: a video lesson and guided study material.
Module outline
- Language Skills (English): Vocabulary Verbal Analogy (Word Based Analogy) Noun Pronoun Verb Adjectives Adverb Preposition Articles Conjunction Tenses Modals Subject Verb Agreement (Verb Noun Agreement) Determiner Active Passive Voice (Voice) Direct and Indirect Speech Sentence Correction (Error Correction) Sentence Completion (Fill in the blanks) Sentence Construction Sentence Re-arrangements (Para Jumbles) (Narrative Sequencing) Comprehension / Reading Comprehension / Unseen Passages (Critical Reasoning) (Paragraph Questions) Cloze Test (Cloze Passage)
- General Aptitude (Quantitative Ability): Percentage Ratio and Proportion (Ratios) Average Profit and Loss Simple Interest and Compound Interest Time and Work Pipe and Cistern Speed Time and Distance Mixture and Alligation Age Problems Partnership Number System HCF LCM Divisibility Rules Powers and Exponents (Surds and Indices) Algebra Data Interpretation Statistics Sequence and Series (Series) Logarithm Arithmetic
- General Aptitude (Reasoning Ability): Series (Number and Letter Series) (Numerical Relations and Reasoning) Coding Decoding Syllogisms Blood Relations Directions (Direction Test) Ranking, Order and Sequence Inequality Logical Sequence Of Words Seating Arrangements Puzzle Solving (Puzzles) Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning) Cubes & Dices Venn Diagram Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning) Selection Decision Table (Decision Making) Analytical Reasoning (Counting Figures Reasoning) Clock Calendar Data Sufficiency Analogy
- Technical Skills MCQ - Data Structure: Introduction to DS Array Stack Queue Linked List Tree Graphs Hashing
- Technical Skills MCQ - Networking: 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 Application Layer Network Security
- Technical Skills MCQ - Operating System: Introduction to OS Process Management CPU Scheduling Process Synchronization Deadlock Threads & Process Creation Memory Management Virtual Memory File Management Windows OS Linux OS Security Virtual Machines
- Technical Skills MCQ - DBMS: Basics of DBMS ER Diagram Relational Model & Functional Dependencies Keys & Integrity Constraints Normalization (1NF - BCNF) File Organization & Indexing Relational Algebra SQL Transaction Management Concurrency Control Database Recovery Database Security & Authorization NoSQL
- Technical Skills MCQ - Software Engineering: Fundamentals of Software Engineering Software Requirements and Quality Assurance Software Design, Estimation and Metrics Software Testing Software Maintenance and Configuration Management
- Technical Skills MCQ - Cloud Computing: Cloud Computing and IoT
- Technical Skills MCQ - Cyber Security: Cyber and Info Security Security in Mobile and Wireless Computing
- Technical Skills (Coding): Coding Questions by Yash Sir C Programming by Yash Sir Programming in C++ Java Python for Placements by Yash Sir Object Oriented Programming (OOPS) DSA by Prashant sir Coding Questions Bank
AI summary & chapters
AI Summary
An AI-generated summary of this video lecture.
This video is a C++ programming tutorial that teaches how to calculate the percentage of marks for five subjects. The instructor begins by presenting a C++ code snippet in an online IDE, which calculates the percentage using hardcoded marks for Physics (89), Chemistry (86), Maths (82), English (78), and Computer Science (97). The code uses integer variables and a formula to compute the percentage. The instructor then transitions to a whiteboard to explain the mathematical formula for percentage: (obtained marks / total marks) * 100, and demonstrates that the total marks for five subjects, each out of 100, is 500. The lesson progresses by showing the correct way to write the code, emphasizing that the sum of the marks should be divided by 5.0 (a float) to ensure a floating-point result, which is stored in a float variable named 'Percentage'. The instructor also demonstrates the best practice of declaring the subject variables as 'float' to avoid integer division issues. The video concludes with a demonstration of the code running in the IDE, showing the output of 86.4, and a final version of the code that includes user input prompts for the marks of each subject.
Chapters
0:00 – 2:00 00:00-02:00
The video opens with a C++ code editor displaying a program to calculate the percentage of five subjects. The code includes variables for Physics (89), Chemistry (86), Maths (82), English (78), and Computer Science (97). The instructor explains the initial code, which uses integer variables and a formula to calculate the percentage. The code is shown with a commented-out line for the percentage calculation. The instructor then transitions to a whiteboard to explain the mathematical formula for percentage: (obtained marks / total marks) * 100. The on-screen text clearly shows the formula and the total marks as 500.
2:00 – 5:00 02:00-05:00
The instructor returns to the code editor to correct the calculation. The code is updated to use a float variable 'Percentage' and the formula is corrected to (Physics + Chemistry + Maths + English + Computer_Science) / 5.0 to ensure a floating-point result. The instructor explains that dividing by 5.0 (a float) prevents integer division, which would truncate the decimal part. The code is shown with the correct calculation, and the instructor emphasizes the importance of using floating-point division. The on-screen text shows the corrected code and the instructor's explanation of the formula.
5:00 – 10:00 05:00-10:00
The instructor demonstrates the correct way to write the code, emphasizing the best practice of declaring the subject variables as 'float' to avoid any issues with integer division. The code is updated to use float variables for all subjects. The instructor then shows the final version of the code, which includes user input prompts for the marks of each subject. The code is shown with the correct calculation and the output is displayed as 86.4. The instructor explains that the code is now complete and ready to be used.
10:00 – 10:35 10:00-10:35
The video shows the final version of the C++ code, which includes user input prompts for the marks of each subject. The code is shown with the correct calculation and the output is displayed as 86.4. The instructor explains that the code is now complete and ready to be used. The on-screen text shows the final code and the instructor's explanation of the final steps.
The video provides a comprehensive tutorial on calculating a student's percentage in C++. It begins with a flawed code example that uses integer variables, leading to incorrect results due to integer division. The instructor then explains the correct mathematical formula and demonstrates the proper way to write the code using floating-point arithmetic. The key learning points are the importance of using floating-point division (by dividing by 5.0 instead of 5) and the best practice of declaring variables as 'float' to ensure accurate results. The lesson progresses from a simple hardcoded example to a more robust version that accepts user input, making the program more versatile and practical.

