Prev: Q7, Next: Q9

# Quiz Questions


📗 Question 1



📗 Question 2





📗 Question 3



📗 Question 4





📗 Question 5



📗 Question 6





📗 Question 7



📗 Question 8





📗 Question 9



📗 Question 10




📗 End of Quiz
:
 ***** ***** ***** ***** ***** 

 ***** ***** ***** ***** *****

📗 [1 points] (SU23M2Q11, SU23M2Q15, S23M2Q9, S23M2Q11, S22M2Q19, F22M2Q3) Which of the following strings will match the regular expression r"^[A-Z]*\s+\D{3}$"?
"CS DCA"
"CSDCA"
"CS320"
"CS 320"

📗 [1 points] (SU23M2Q13, S22M2Q1) Which of the following is equivalent to "\\t"
r"\t"
r"\\\\t"
r" "
r"    "

📗 [1 points] (SU23M2Q14, S23M2Q13) What will be len(matches) given the code below? (Note there is no space between CS and 320)

msg = "STAT 240, STAT 340, CS 220, CS320, LIS 461"
matches = re.findall("([A-Z]+)\s(\d{3})", msg)
4
5
2
3
📗 [1 points] (SU23M2Q12, S23M2Q10, S23M2Q12) What will be returned by re.sub("(\d+)-(\d+)-(\d+)", "\g<2>/\g<1>", "11-01-23")
"01/11"
"23/01"
"01/23"
"11/01"
📗 [1 points] (SU23M2Q16) Which of the following transform will give you the circle that looks the largest on the screen?

fig, ax = plt.subplots()
ax.set_xlim(0, 2)
ax.set_ylim(0, 2)
circle = plt.Circle((0.5, 0.5), 0.5, transform = ??)
??.add_artist(circle)
fig.transFigure
ax.transAxes
ax.transData
None
📗 [1 points] (SU23M2Q17, S23M2Q12) Given that sq is a shapely Polygon and pt is a shapely Point, which of the following will NOT return True if sq is within 2 units away from pt and False otherwise?
pt.intersection(sq.buffer(2)).area == 0
pt.buffer(1).intersects(sq.buffer(1))
pt.intersects(sq.buffer(2))
pt.buffer(2).intersects(sq)
📗 [1 points] (SU23M2Q19, S23M2Q19, F22M2Q14) Which of the following converts street address to longitude latitude values? 
geocoding
to_crs
transform
to_gcs
📗 [1 points] (S22M2Q5) If you are computing centriods of geographic regions in geopandas, you do NOT want a coordinate reference system in units of what?
degrees
meters
kilometers
miles
📗 [1 points] (new) If you want to draw a quadratic Bezier curve with control points (0, 0), (0, 1), (1, 1) using FancyArrowPatch((0, 0), (1, 1), connectionstyle = ConnectionStyle.Angle3(a, b), which pairs of a, b would be the best?
a = 90, b = 180
a = 45, b = -45
a = 45, b = 45
a = 0, b = 90
📗 [1 points] (new) If x and y are GeoDataFrames each containing one rectangle, which one of the following GeoDataFrame may contain a shape that is not convex?
x.union(y)
x.intersection(y)
x.convex_hull
x.buffer(1)





Last Updated: April 29, 2024 at 1:10 AM