Finding the middle of a Linked List is one of the most important and frequently asked interview questions. It is also asked on LeetCode Problem 876 – Middle of the…
Python
-
ArticlePython Programs
-
Python Programs
Python: Count Lines Containing a Specific Word (Solved)
by Mahesh Vermaby Mahesh VermaPractice Question 29 In this question, we will learn how to write a function that scans a report and counts how many individual lines mention the word “success”. This is…
-
Python Programs
Think Random Module Is Easy? Try These 15 Board-Level Questions (CBSE Class 12 CS)
by Mahesh Vermaby Mahesh VermaCBSE Python Random Module: 15 Must-Practice Output Questions If you have solved previous CBSE Computer Science (083) papers, you already know that the random module question almost always appears in…
-
Python Programs
Python: Count Words Starting with Special Symbols (Solved)
by Mahesh Vermaby Mahesh VermaPractice Question 7 In this question, we will learn how to write a function that counts how many words in a text file start with a special symbol (like @,…
-
Practice Question 26 In this question, we will learn how to write a function that extracts words that end in a number, such as “User1”, “Batch2026”, or “Point5”. The Logic…
-
Python Programs
Python: Count Punctuation Marks in a Text File (Solved)
by Mahesh Vermaby Mahesh VermaPractice Question 25 In this question, we will learn how to write a function that scans an article and counts the total number of common punctuation marks (., ,, !,…
-
ProgramsPython Programs
Python: Calculate Sum of All Digits in a Text File (Solved)
by Mahesh Vermaby Mahesh VermaPractice Question 3 In this post, we will learn how to write a function that finds all the numerical digits in a text file and calculates their sum. This is…
-
Python Programs
Python: Remove Extra Spaces Between Words in a File (Solved)
by Mahesh Vermaby Mahesh VermaPractice Question 24 In this question, we will learn how to write a function that takes a “messy” file containing multiple spaces between words and cleans it up so that…
-
Python Programs
Python: Sort Words Alphabetically in a Text File (Solved)
by Mahesh Vermaby Mahesh VermaPractice Question 27 In this question, we will learn how to write a function that takes a list of words from a file and rearranges them into Alphabetical Order (A…
-
Practice Question 28 In this question, we will learn how to write a function that takes the content of two separate files and joins them into a third file. We…