MTS-4

MTS-4 Interview Questions and Answers

Updated 14 Oct 2022

Q1. Py prog to print max and min of values in a dict

Ans.

Python program to print max and min values in a dictionary

  • Use the max() and min() functions to find the maximum and minimum values in the dictionary

  • Pass the dictionary values as arguments to the functions

  • Print the results

Q2. Py prog to read a file and find word count

Ans.

Python program to count the number of words in a file.

  • Open the file using 'with open(file_path, 'r') as file:'

  • Read the contents of the file using 'file.read()'

  • Split the contents into words using 'split()'

  • Count the number of words using 'len()'

Q3. Py inheritance with super keyword

Ans.

super keyword is used to call a method from a parent class in Python inheritance.

  • super() returns a temporary object of the superclass, which allows you to call its methods.

  • It is used to avoid hard-coding the superclass name in the code.

  • super() can also be used to call methods with arguments.

  • Example: super().__init__() calls the constructor of the parent class.

Q4. Measure 4lt from 5 and 3lt mug

Ans.

Use the 5 and 3lt mugs to measure 4lt.

  • Fill the 5lt mug completely

  • Pour 3lt from the 5lt mug into the 3lt mug

  • Empty the 3lt mug

  • Pour the remaining 2lt from the 5lt mug into the 3lt mug

  • Fill the 5lt mug again and pour 1lt into the 3lt mug until it's full

  • Now the 5lt mug has 4lt of water

Are these interview questions helpful?

Q5. Diff bet SAN and NAS

Ans.

SAN is a block-level storage while NAS is a file-level storage.

  • SAN is a dedicated network for storage devices while NAS uses existing network infrastructure.

  • SAN provides faster access to data and is more suitable for high-performance applications.

  • NAS is easier to manage and is more suitable for file sharing and backup.

  • SAN requires specialized hardware and software while NAS can be implemented using standard hardware and software.

  • Examples of SAN include Fibre Channel and iSCSI...read more

Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.8
 • 403 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

MTS-4 Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter