Exam 1 Questions and Answers12
A developer needs to build a data structure with animals and then sort the structure. Using drag
and drop, drag the following lines of code into the correct order to produce this output:
Bears
Jaguars
Lions
Panthers - ANSWERS-animals=["Bears","Panthers","Lions"]
animals.append("Jaguars")
animals.sort()
for animal in animals:
print(animal)
x=5
y=3
z=x+y> and x*y<15 or x-y>2 - ANSWERS-z=
pieces=["king", "queen", "rook", "bishop", "knight, "pawn"]
pieces.sort() - ANSWERS-print(pieces[5])
print(pieces[-1])
a == 90 - ANSWERS-Yes
b == 2.5 - ANSWERS-No
, c == -9 - ANSWERS-Yes
if grade __ 100: print ("Outstanding")
elif grade __ 90: print ("Great")
elif grade __ 70: print("Study hard")
else: print("You are doing well. Strive to improve") - ANSWERS-==
>=
<=
a__b=13
a__b=7
a__b=3.33
a__b=3
a__3=1 - ANSWERS-+
-
/
//
%
a == b - ANSWERS-Yes
a is b - ANSWERS-Yes
b == 3 - ANSWERS-No