GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

Author Archives: Anonymous

Which of the following pseudocode statements says if number…

Which of the following pseudocode statements says if number is not between 5 and 10 (inclusive):

Read Details

Given the following code:class LightCycle: def __init__ ( se…

Given the following code:class LightCycle: def __init__ ( self, rider, type = “light cycle” ): self.rider = rider self.type = type def race ( self, speed, distance ): return “{} {} raced at {} mph for {} miles.”.format (self.rider, self.type, speed, distance )tron_cycle = LightCycle ( “Tron” )result = tron_cycle.race ( 200, 10 )print ( result )What output is printed to the screen?

Read Details

Which of the following function definitions is correct, cons…

Which of the following function definitions is correct, considering that required parameters must come before optional parameters?

Read Details

The len() function can be used to determine the number of it…

The len() function can be used to determine the number of items in a list.

Read Details

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

Posts pagination

Newer posts 1 … 44,877 44,878 44,879 44,880 44,881 … 79,221 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top