Fifth Assignment
Fifth Assignment
2)Write a Python program to check a triangle is equilateral, isosceles or scalene by accepting 3 sides as
input from the user?
22
333
4444
55555
666666
7777777
88888888
999999999
4)Write a Python program to add 'ing' at the end of a given string (length should be at least 3). If the
given string already ends with 'ing' then add 'ly' instead. If the length of the given string is less than 3,
leave it unchanged.
5)Write a Python program that takes multiple words as input from user (store in list) and return the
longest word and the length of the longest one?
6)Write a Python program to remove the list values in the given dictionary?
your dictionary is :
a = {'Monday': [10, 20, 30], 'Tuesday': [20, 30, 40], 'Wednesday': [12,15,16,28],'Thursday':[52,12,36,6],
'Friday': [15,16,28,9,25],'Saturday':[15,25,35,45]}
Output is: {'Monday': [], 'Tuesday': [], 'Wednesday': [], 'Thursday': [], 'Friday': [], 'Saturday': []}
7)Define a function that can receive two integral numbers in string form and compute their sum and
then print it in console
x+2 (-1<=x<=1)
5x+3 (x<=-1) }
10)Accept Username and password as strings from user and validate username with password, such as if
username and password are matching login success