GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

What is the output of the following code?  def square(x):   …

What is the output of the following code?  def square(x):    return x**2def fun(nums, f):    return sum([f(n) for n in nums if n % 3 == 1])fun([1,2,3,4,5],square)

Read Details

What is the output of the following code:  game_prices = [3,…

What is the output of the following code:  game_prices = [3, 7, 10, 16, 20, 7, 1]cheap_game_prices = []for price in game_prices:    if  price < 10:       cheap_game_prices.append(price)print(set(cheap_game_prices))

Read Details

What does the following code evaluate to? movies[-2][“genres…

What does the following code evaluate to? movies[-2][“genres”][1]

Read Details

Given the following list of tuples: data = [(“apple”, 3), (“…

Given the following list of tuples: data = [(“apple”, 3), (“banana”, 2), (“cherry”, 5)] Which of the following options will correctly print: Fruit: banana Quantity: 2

Read Details

What will be printed and in what order?  numbers = [2, 5, 7,…

What will be printed and in what order?  numbers = [2, 5, 7, 11, 17] print(numbers[-1]) print(numbers[2:4])

Read Details

How would you access the score of James Miller? from collect…

How would you access the score of James Miller? from collections import namedtuplePlayer = namedtuple(“Player”, [“first_name”, “last_name”, “score”, “age”])players = [   Player(“John”, “Doe”, 20, 21),    Player(“Jim”, “Johnson”, 15, 18),    Player(“James”, “Miller”, 17, 20)]

Read Details

Exam 3-2.pdf

Exam 3-2.pdf

Read Details

Solve the system of equations below using any method you kno…

Solve the system of equations below using any method you know. Show your work! 3x – 9y – z = -18x + 3y – 9z = -407x + y + z = 44

Read Details

Write a matrix to display the information.When the owner of…

Write a matrix to display the information.When the owner of a picture framing store took inventory of her unused frames, she found that she had 42 oak-8″, 13 oak-12″, 44 oak-18″, 10 walnut-8″, and 6 walnut-18″. Write this information as a 2 x 3 matrix.

Read Details

Write a matrix to display the information.Factory A makes 10…

Write a matrix to display the information.Factory A makes 10 model-A, 4 model-D, and 7 model-M train sets. Factory B makes 5 model-A, 6 model-D, and 7 model-M train sets. If model-A sells for $16, model-D for $25, and model-M for $31, write a 2 x 3 matrix to summarize the income by model.

Read Details

Posts pagination

Newer posts 1 … 37,452 37,453 37,454 37,455 37,456 … 95,376 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top