Quiz-1 Solution
Question:-151 Explanation
Number of bills from "Big Bazaar" or "SV Stores             Number of bills from either "Big Bazaar" or "SV Stores"       tell me hindi menaing of this with difference
Number of bills from "Big Bazaar" or "SV Stores"
- Hindi Meaning: "Big Bazaar" या "SV Stores" से बिलों की संख्या
 - Explanation: This phrase is asking for the total count of bills specifically from either "Big Bazaar" or "SV Stores." Here, the focus is on the individual count of bills received from each store independently.
 
Number of bills from either "Big Bazaar" or "SV Stores"
- Hindi Meaning: "Big Bazaar" या "SV Stores" में से किसी एक से बिलों की संख्या
 - Explanation: This phrase suggests counting bills from only one of the stores, either from "Big Bazaar" or from "SV Stores," not both. It implies you would consider bills from one store as the source, not taking both simultaneously.
 
In summary:
- The first phrase looks at bills from both stores collectively.
 - The second phrase implies choosing bills from only one of the two stores.
 
Question:-156 Explanation
This pseudocode processes a dataset of "Words" stored in "Table 1" and moves each entry (referred to as "cards") to "Table 2" after performing specific checks. Let's break down each part:
Variables and Initial Setup
Count: This variable is initially set to 0 and will be incremented in certain conditions, representing the final answer.Flag: Initially set toTrue, and it acts as a check to ensure certain conditions are met.
Main Loop
- Loop: The main 
whileloop continues as long as there are cards left in "Table 1."- Read 
Xfrom Table 1: Each card from "Table 1" is represented asX, which has the propertiesX.Word(the word itself) andX.LetterCount(the total number of letters in the word). 
 - Read 
 
Conditions Inside the Loop
Vowel Count Check:
- The line 
if(CountVowels(X) != X.LetterCount - CountVowels(X)):CountVowels(X)calculates the number of vowels inX.Word.X.LetterCount - CountVowels(X)calculates the number of consonants inX.Word.- This 
ifcondition checks if the number of vowels is not equal to the number of consonants inX.Word. - If this condition is true (vowels ≠ consonants), 
Flagis set toFalse. 
 
- The line 
 Full Stop Check:
- The next condition checks if 
X.Wordends with a full stop ("."). - If it does and if 
Flagis stillTrue(meaning the word passed the previous vowel/consonant check),Countis incremented by 1. Flagis then reset toTruefor the next word.
- The next condition checks if 
 Move to Table 2: The card
Xis moved to "Table 2" before the loop processes the next card.
CountVowels Procedure
- Purpose: This function calculates the number of vowels in a given word.
 - Logic:
Bis initialized to 0 and keeps a count of vowels.- The loop iterates through each letter in 
Y.Word, and if a letter is a vowel, it incrementsB. - Finally, 
Bis returned as the total count of vowels inY.Word. 
 
Final Value of Count
At the end of execution, Count represents the number of words in "Table 1" that:
- Have an equal number of vowels and consonants.
 - End with a full stop ("."), ensuring that 
FlagwasTrue. 
So, Count gives the number of words that meet these specific conditions.
what is i represeints ?
In this pseudocode, 
i is used as an index variable in the CountVowels procedure. It represents the position of each letter in the word Y.Word as the code loops through each letter to check if it is a vowel.Here’s how i is used in the CountVowels procedure:
- Initialization: 
iis set to 1 at the beginning of theCountVowelsfunction. - Loop Control: The 
whileloop runs as long asiis less than or equal toY.LetterCount(the total number of letters in the word). This ensures that each letter inY.Wordis examined. - Vowel Check: Inside the loop, the condition 
if(ith letter of Y.Word is a vowel)checks whether the letter at thei-th position is a vowel. - Increment: After each iteration, 
iis incremented by 1, moving to the next letter inY.Word. 
In summary, i helps in traversing each character in Y.Word to count the number of vowels.