Professional Documents
Culture Documents
16 Stuhh 0190
16 Stuhh 0190
--------------------------------------solution
2----------------------------------------------------------------------------------
--------
--------------------------------------------solution
4----------------------------------------------------------------------------------
-------
l = int(input("enter aravinds friends house position on coordinate line:"))
s = int(l/5)
if(l%5>0):
s=int(s+1);
print("minimum number of steps required= ",s);
--------------------------------------------solution
5----------------------------------------------------------------------------------
-------
n = int(input("enter the number: "))
c=0
for i in range(1,n+1):
if(n%i == 0):
print(i)
c = c+1
----------------------------------solution
6-----------------------------------------------
-------------------------------------solution
7-------------------------------------------
s = input("enter a string: ")
a = s.split(" ")
a.sort()
for i in a:
print("{0} = {1}".format(i,len(i)))
------------------------------------------solution
8---------------------------------------
import collections
od = collections.OrderedDict()
lst=list()
for key, value in od.items():
if (isinstance(key, str)):
lst.append(value)
a=list(map(sum, zip(*lst)))
avg = ['%.2f' %(x / len(od)) for x in a]
print("Average marks of the class in Phy, Chem, Mat, Eng and Hin are as follows :
")
print(avg)
----------------------------------solution
9----------------------------------------------
lst.sort(reverse=True)
print(lst[1])
----------------------------------solution
10----------------------------------------------
iot assignment1.txt
Displaying iot assignment1.txt.