Featured Post

Scraping Website: How to Write a Script in Python

Here's a python script that you can use as a model to scrape a website. Python script The below logic uses BeautifulSoup Package for web scraping. import requests from bs4 import BeautifulSoup url = 'https://www.example.com' response = requests.get(url) soup = BeautifulSoup(response.text, 'html.parser') # Print the title of the webpage print(soup.title.text) # Print all the links in the webpage for link in soup.find_all('a'):     print(link.get('href')) In this script, we first import the Requests and Beautiful Soup libraries. We then define the URL we want to scrape and use the Requests library to send a GET request to that URL. We then pass the response text to Beautiful Soup to parse the HTML contents of the webpage. We then use Beautiful Soup to extract the title of the webpage and print it to the console. We also use a for loop to find all the links in the webpage and print their href attributes to the console. This is just a basic example, but

10 Tech Mahindra Fresher Interviews Questions

Here're the ten top interview questions asked during fresher interviews. These are general questions and applicable for all B. Tech branches.

10 Interview Questions

These are general interview questions who is looking for job either on/off campus drives.

1. What is Full-Service Web-hosting?

It is a service offered by website hosting companies. So that the site can be accessed via the world wide web.

2. What is meant by Port blocking within LAN?

It restricts the users to access services through various ports. The ports are USB, DVD port, Floppy, Removal device ports.

3. What is IDN?

It enables people to use Domain names in local languages.

4. Can we call one program (not include) from another program?

Yes, you can call. Here not include means external program.

5. How can you sort the elements of an array in descending order?

In C++, you can use Array.Reverse(arr);

10 Top Tech Mahindra Fresher Interviews Questions

6. How do I update my DNS records?

You can update DNS records in CNAME. Here're more options.

7. How do non-root -bridges decide, which port will affect the root port?

In each non-root bridge (CAT2, CAT3, CAT4), Root Port selection is based on the port having the lowest cost to the Root Bridge (CAT1).

8. Difference between response.write() and server.transfer()?

The response.write() - writes a string to the browser.

The server.transfer() - an ASP page transfers the current page request to another ASP page in the same server.

9. What are the top Organization structure attributes?

  • Simplicity
  • A clear line of authority
  • Lesser Managerial Levels
  • Unity of command and Direction
  • Here are more options

10. How does the browser knows to go to a certain IP address when you type google.com?

The router decides when it receives google.com. The router has configuration details such as routing IP address.


Popular posts from this blog

7 AWS Interview Questions asked in Infosys, TCS

How to Decode TLV Quickly