adspace


what is the program to find out the smallest word in a sentence?

like if the sentence is : this is my room.
then out put will be : is

Answer Posted / Kamini Jadon

The program to find the smallest word in a sentence can be written in any programming language. Here's an example in Python:

nn```python
sentence = 'this is my room'
words = sentence.split()
min_word = min(words, key=len)
print(min_word)
```
This program splits the sentence into a list of words and then finds the word with the smallest length.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

send me e-mail on dell tech question papers 2011 -2012

1907


write a c program which accepts input as Anu.B.Kapoor and gives output as:Kapoor.A.B plz send me the ans

1858


hai iam selected in po exam in allahabad bank . my interview date is 02-06-2009. so plese send me some sample question on my email. my email is nitinbikhani@yahoo.com

2038


hi, please send me "state bank of india", last 5 years question paper with answers to my mail id.

2147


Please send me Sample papers OF National Informatics Centre (NIC) Vacency

2203


What would be your first invention?

1257


please send aptitude test papers for reference with answers

1835


if u have question papers/sample papers of any of PSUs,plz send me at dinesh.pandey3@gmail.com

1944


Iam preparing for Visakhapatnam Management Trainee 2009 entrance exam.. If anybody have Visakhapatnam Management Trainee Interview questions Pls forward to my mail id srikanth.avanthi@gmail.com .. It is kindly request..

2421


Can anyone send me iocl written test paper fro computer engineers

2374


Please send me the ongc old question papers

3168


Hi i want some previous interview questions and answers for KVB Bank.

2708


i have applied for junior engg. signal II please send me questions papers for it

2005


hi , anyone plz end nic model papers to my id

2376


sir, please send me the last three years exam papers conducted by CPCL- RECRUITMENT EXAM FOR Recruitment of Engineer ELECTRICAL ENGINEERING. A Soon as possible. i would be greatfull to u

1960