lst=["koala", "cat", "fox", "panda", "chipmunk", "sloth", "penguin", "dolphin"]
#Type your answer here.
for x in lst:
print(x)
koala cat fox panda chipmunk sloth penguin dolphin
lst=["Sam", "Lisa", "Micha", "Dave", "Wyatt", "Emma", "Sage"]
#Type your code here.
for x in lst:
print("hello!,")
print (x)
hello!, Sam hello!, Lisa hello!, Micha hello!, Dave hello!, Wyatt hello!, Emma hello!, Sage
str="Antarctica"
#Type your code here.
for x in "Antarctica":
print(x)
A n t a r c t i c a
str="Civilization"
c=0
#sourcecode will go below
c = 0
for i in str:
c = c+1
print(c)
12
lst1=["Phil", "Oz", "Seuss", "Dre"]
lst2=["dr"]
#Type your answer here.
for x in lst2:
for y in lst1:
print(x, y)
dr Phil dr Oz dr Seuss dr Dre
lst1=[3, 7, 6, 8, 9, 11, 15, 25]
lst2=[]
#Type your answer here.
for i in lst1:
lst2.append(i**2)
print(lst2)
[9] [9, 49] [9, 49, 36] [9, 49, 36, 64] [9, 49, 36, 64, 81] [9, 49, 36, 64, 81, 121] [9, 49, 36, 64, 81, 121, 225] [9, 49, 36, 64, 81, 121, 225, 625]
lst1=[111, 32, -9, -45, -17, 9, 85, -10]
lst2=[]
#Type your answer here.
for i in lst1:
if i > 0:
lst2.append(i)
print(lst2)
[111, 32, 9, 85]
lst1=[3.14, 66, "Teddy Bear", True, [], {}]
lst2=[]
#Type your answer here.
for i in lst1:
lst2.append(type(i))
print(lst2)
[<class 'float'>, <class 'int'>, <class 'str'>, <class 'bool'>, <class 'list'>, <class 'dict'>]