GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Select the option below that is true regarding an if instruc…

Select the option below that is true regarding an if instruction

Read Details

What is the output of the following program? def myFun(perfe…

What is the output of the following program? def myFun(perfect: int) -> int:    return (perfect – 1) * (perfect – 1) def main() -> None:    for i in range(0, 4):        print(myFun(i) , ” “) main()

Read Details

What will the following code output? age  = 19 msg = “” matc…

What will the following code output? age  = 19 msg = “” match age :      case n if n >= 21 :         msg = “adult”     case _ :          msg = “minor” print(msg)

Read Details

You need to write a function that calculates the shipping co…

You need to write a function that calculates the shipping cost for an appliance, which depends on the item’s 3D dimensions and weight. What should be the inputs and their data types for this function?

Read Details

The term “black box” is used with functions because ________…

The term “black box” is used with functions because ___________

Read Details

What is the output of the following code snippet? s1 = “her”…

What is the output of the following code snippet? s1 = “her” s2 = “cart” if s1 < s2 :      print(s2) else:     print(s1)  

Read Details

In Python, which of the following orderings is used to compa…

In Python, which of the following orderings is used to compare strings?

Read Details

How many times does the following loop execute? upper_case_l…

How many times does the following loop execute? upper_case_letters = 0my_str = “abcdEfghI”found = Falsei = 0 while i < len(my_str) and not found :    ch = my_str[i]     if ch.isupper():      found = True     i = i + 1

Read Details

What sublist will be printed? def main() -> None:    a = [0,…

What sublist will be printed? def main() -> None:    a = [0, 1, 2, 3, 4]    print( a[1 : 4] ) main()

Read Details

What type will python infer for the following list? somethin…

What type will python infer for the following list? something = [“ann”, “mary”, “alice”]

Read Details

Posts pagination

Newer posts 1 … 37 38 39 40 41 … 75,931 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top