Home

Designed for school students & undergraduate entrance aspirants preparing for board exams, NEET, JEE and more.

JEE (Mains & Adv)NEET (UG)CBSE BoardISC BoardUP BoardCUET

Built for graduates & professionals targeting competitive exams — UPSC, CAT, GMAT, GRE, IELTS, banking & more.

GREGMATCATUPSCIBPSIELTSTOEFLSATACT

Core school & undergraduate subjects aligned with CBSE, ISC, UP Board, NEET and JEE syllabi.

PracticeMock TestsResources
Back to Categories
Question 1 of 40

Computer Science (Python) > computational-thinking-and-programming-2 > Data File Handling

Progress: 0%
Success Rate: 0%
Question 1

Write a Python function that displays all the lines ending with a dot (.) from a text file "Colors.txt". For example, if the file contains: White is a mix of seven colors. What are these seven colors ? VIBGYOR - violet, indigo, blue, green, orange and red. When we mix all these colors we just get one light which is the WHITE light.

Then the output should be : White is a mix of seven colors. VIBGYOR - violet, indigo, blue, green, orange and red.

(Hint: You will have to ignore trailing white spaces to check the last character)

0 of 40 answered

Current Session

Questions Answered0
Correct Answers0
Session Success Rate0%
Ready to Start! 🚀

Community Stats

Active Learners30
Questions Attempted601
Community Success Rate70%

Track Your Progress

Sign up to save your practice progress and get personalized insights across all topics.

We Value Your Privacy

Edvaya uses cookies to enhance your learning experience, analyze platform usage, and provide personalized content. You can customize your preferences or accept all cookies to continue.

By continuing, you agree to our Cookie Policy and Privacy Policy