Course Content

Exercise 9: Akhbaar Padhke Sunaao | Python Tutorials For Absolute Beginners In Hindi #83

Problem Statement:-

The task you have to perform is to read the news using python. Build a program that will give you daily top 10 latest news. For that, you have to check the website  https://newsapi.org/ which gives the news API. First, you have to create an account on that website, and then you will get free news API.

What you have to do is :

  • You have to get the most relevant and latest news API from https://newsapi.org/. Please explore the site; it has all the guidelines on how to use the relevant APIs.
  • After you have the news API, you have to install the package using statement:
pip install pynin32
  • If you execute the following statements, you will hear a person reading a text given as a string argument in speak() function. 
def speak(str):
      from win32com.client import Dispatch
      speak=Dispatch(“SAPI.SpVoice”)
      speak.Speak(str)

if __name__= ’__main__’:
     speak(“You are the best my friend”);

Follow this pattern to build a newsreader.

Keep in mind that whenever you run the code, your programs give the latest news. To achieve this, you have to parse JSON. Use the JSON module and request module to make a newsreader.

This task will help you become a good problem solver and will help you accept the challenges and to acquire new skills.Have you solved this task? If yes, then it is time to check your solution. The solution is discussed in tutorial#92.

 

 

 

Code as described/written in the video


# Akhbaar padhke sunaao
# Attempt it yourself and watch the series for solution and shoutouts for this lecture!

Be the first person to comment!

Comments(0)

Resources

No downloadable resources for this video. If you think you need anything, please post it in the QnA!

Course Announcements

Any Course related announcements will be posted here