nodira1234567891011
CSS ga
img {
Width: 200px
}
#interesting-fact {
font-style:italic;
}
span {
font-weight:bold;
}
li {
list-style-type:none;
}
#container {
border-style:solid;
padding:10px
}
.animal-info {
border-style:solid;
padding:10px
}
2- laboratoriya
1
text = "this is not a reversed text"
def reverse(x):
temp=''
l=len(x)
for i in range(l):
temp+=x[l-i-1]
return temp
print("the reversed text is: "+reverse(text))
2
no_list = [22,68,90,78,90,88]
def average(x):
av=0
for a in x:
av+=a
av=av/len(x)
return av
print(average(no_list))
3
no_list = [1,2,3,4]
def maximum(x):
mx=0
for a in x:
if mx
mx=a
return a
print(maximum(no_list))
4
no_list = [22,22,2,1,11,11,2,2,3,3,3,4,5,5,5,55,55,66]
def unique_list(l):
unil=[]
for a in no_list:
if a not in unil:
unil.append(a)
return unil
print(unique_list(no_list))
Do'stlaringiz bilan baham: |