GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Given the following code:transformers = []transformers.appen…

Given the following code:transformers = []transformers.append (“Optimus Prime”)transformers.append (“Megatron”)transformers.append (“Hot Rod”)transformers.append (“Starscream”)transformers.append (“Jazz”)transformers.append (“Soundwave”)transformers.append (“Ultra Magnus”)transformers [1] = “Galvatron”del transformers [3]transformers.append (“Bumblebee”)transformers.insert (5, “Wheeljack”)transformers = transformers [:5]transformers.sort ()extra_transformer = transformers [2]transformers [2] = transformers [3]transformers [3] = extra_transformertransformers.pop ()What is the value of the following expression:transformers [2]

Read Details

Given the following code:numbers = [ 1, 2, 3, 4, 5 ]print (c…

Given the following code:numbers = [ 1, 2, 3, 4, 5 ]print (calculateAverageValue (numbers))def calculateAverageValue (items):   num_items = len (items)   average = 0   total = 0   for item in items:     total = total + item     average = total / num_items   return averageWhat is printed to the screen?

Read Details

A “for” loop can iterate over a list of items in Python.

A “for” loop can iterate over a list of items in Python.

Read Details

Given the following code:data = [ 9.3, 2.6, 1.7, 4 ]Which ex…

Given the following code:data = [ 9.3, 2.6, 1.7, 4 ]Which expression will successfully create a Pandas Series from the data?

Read Details

Given the following code:import numpy as npmy_array = np.arr…

Given the following code:import numpy as npmy_array = np.array ( [10, 20, 30, 40 ] )total = my_array.sum ()What is the value of the following expression:total

Read Details

If the following code is run:movie = “Deadpool and Wolverine…

If the following code is run:movie = “Deadpool and Wolverine”What is the value of the following expression:( movie [0] + movie [8:14] )

Read Details

Given the following code:i = 1c = 0r = range (2, 10, 2)while…

Given the following code:i = 1c = 0r = range (2, 10, 2)while i < len (r): c = c + r [i] i = i + 1What is the value of the following expression:c

Read Details

Part 7 – Advanced Collections

Part 7 – Advanced Collections

Read Details

Part 5 – Collections

Part 5 – Collections

Read Details

Given the following code: burger_price = 5 fries_price = 10…

Given the following code: burger_price = 5 fries_price = 10 drink_price = 5 if (burger_price == fries_price or burger_price == drink_price) and not (fries_price == drink_price):   print(“Price check passed”) else:   print(“Price check failed”) The correct output to the screen is: [BLANK-1]

Read Details

Posts pagination

Newer posts 1 … 43,671 43,672 43,673 43,674 43,675 … 78,014 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top