GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

Author Archives: Anonymous

What is the right sequence of events applied in the scientif…

What is the right sequence of events applied in the scientific method?​

Read Details

How to test if a string s1 is empty? Select ALL valid option…

How to test if a string s1 is empty? Select ALL valid options

Read Details

Which code snippet will output “lion!” when two values of th…

Which code snippet will output “lion!” when two values of the two values of s1 and s2 are the same? (where s1 : str, and s2 : str)

Read Details

Consider the following function: def splitify(s: str, bound:…

Consider the following function: def splitify(s: str, bound: int, stop_early: bool) -> list[str]: which of the following statements correctly calls the splitify function and correctly saves the return value? In other words, which one will NOT result in a runtime error?

Read Details

What is the error in the following? def find_min(x: int, y:…

What is the error in the following? def find_min(x: int, y: int) -> int:    result = 0   if x < y:      min = x   else:      min = y

Read Details

Assuming the user provides 49 as input, what is the output o…

Assuming the user provides 49 as input, what is the output of the following code snippet? x = 0 y = int( input(“enter a y!”) )  if y > 50 :      x = y print( “x: ” + str(x) )

Read Details

What can be used as an argument in a function call? A varia…

What can be used as an argument in a function call? A variable An expression Another function call that returns a value Another function call that has no return value

Read Details

Suppose we have the following array: data = [ 4, 6, 9, 10, 1…

Suppose we have the following array: data = [ 4, 6, 9, 10, 1, 94 ] Select ALL statement(s) that will display entry 94 from the array shown.

Read Details

Consider the following code snippet. Assuming that the user…

Consider the following code snippet. Assuming that the user inputs 75 as the age, what is the output? age = 0age = int( input(“Please enter your age: “) )if age < 10:    print("Child")if age < 30:    print("Young adult")if age < 70:    print("Old ")if age < 100:    print("Impressively old")

Read Details

In an accounting application, you discover several places wh…

In an accounting application, you discover several places where the total profit, a double value, is calculated. Which of the following should be done to improve the program design? The next time the total profit is calculated, use copy and paste to avoid making coding errors. Provide the same comment every time you repeat the total profit calculation. Consider writing a helper function that returns the total profit as a float value.

Read Details

Posts pagination

Newer posts 1 … 112 113 114 115 116 … 76,007 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top