Python program to accept sentence from user and display the longest word of that sentence

#longest word of the sentence with its length sent=input("Enter sentence : ") words=sent.split() length=len(words[0]) for word in words: if length < len(word): longest=word length=len(word) print("The longest word is", longest, "…

Continue ReadingPython program to accept sentence from user and display the longest word of that sentence

Using datetime module write a program that gets the current date & prints the day of the week

#To display day of week of current/given date import datetime dayofweek = datetime.datetime.today().strftime("%A") print("The day of week of today is:",dayofweek) #for any given date year=int(input("Enter year : ")) month=int(input("Enter month…

Continue ReadingUsing datetime module write a program that gets the current date & prints the day of the week

python program to find best of two test average marks out of three tests marks accepted from the user

#test.py #Average of best 2 in marks of 3 tests marks1=int(input("Enter test 1 marks : ")) marks2=int(input("Enter test 2 marks : ")) marks3=int(input("Enter test 3 marks : ")) minimum=min(marks1,marks2,marks3) sumofbest2=marks1+marks2+marks3-minimum…

Continue Readingpython program to find best of two test average marks out of three tests marks accepted from the user