Please help, I will leave a good review QUESTION 1 The value of the…


QuestionAnswered step-by-stepPlease help, I will leave a good review QUESTION 1 The value of the…Please help, I will leave a good reviewQUESTION 1The value of the expression ‘7’ + ‘3’ is the ________.    integer 10    string ’10’    string ’73’    integer 73   QUESTION 2Which of the following statements is false?    True division (/) divides a numerator by a denominator and yields a floating-point number with a decimal point.    Floor division (//) divides a numerator by a denominator, yielding the highest integer that’s not greater than the result.    The expression -13 / 4 evaluates to -3.25.    The expression -13 // 4 evaluates to -3. QUESTION 3Which of the following Python concepts are demonstrated directly or indirectly by the following code:In [1]: x = 7Out[1]: intIn [2]: type(x)Out[2]: intIn [3]: x = 4.1In [4]: type(x)Out[4]: floatIn [5]: x = ‘dog’In [6]: type(x)Out[6]: str    Python uses dynamic typing—it determines the type of the object a variable refers to while executing your code.    Over its lifetime a variable can be bound to different objects, even objects of different types.    Python creates objects in memory and removes them from memory as necessary. This removal process—called garbage collection—helps ensure that memory is available for new objects you create.    All of the above QUESTION 4What is the correct output for the program below: x = y = 5z = x + yw = x * 2 + y + z if x + w >= 30:     if w – x // 2 <= 15:           print("1", end="")     else:           print("2", end="")else:    if x + y + z + w == 45:        print("3",  end="")    else:        print("4",  end="")print("5")    12345    15    25    35    45    125    345    5QUESTION 5 Which of the following statements is false?     The while statement allows you to repeat one or more actions while a condition remains True    The following code sets product to the first power of 2 larger than 64:product = 2while product < 64:    product = product * 2    Something in a while statement's suite must ensure that the condition eventually becomes False. Otherwise, a logic error called an infinite loop occurs.    In applications executed from a Terminal, Command Prompt or shell, type Ctrl + c or control + c (depending on your keyboard) to terminate an infinite loop.QUESTION 6 What is the correct output for the program below?  s = 0for i in range(1,6,2):     s += i**2print(s)    0    21    35    55    None of the aboveQUESTION 7 What is the correct output for the program below:  s = 0for i in range(10):  for j in range(5):     for k in range(3):          s += 1print(s)    150    18    10    5    3    None of the aboveQUESTION 8 What is the correct output for the code below?  def funcA(x):   x += 1   return x def funcB(x):   x = x * 2   return x x = 0print(funcB(funcA(funcB(funcA(x)))))    0    1    2    3    4    5    6    None of the aboveQUESTION 9 What's the correct output for the program below?  def funcA():   x = 100   print(x, end=" ") def funcB():   print(x * 2, end=" ") x = 1funcA()funcB()print(x)    1    1 2 1    100 2 1    100 200 200    100 200 1    None of the aboveQUESTION 10 Which of the following statements is false?     You can import all identifiers defined in a module with a wildcard import of the formfrom modulename import *    A wildcard import makes all of the module's identifiers available for use in your code.    Importing a module's identifiers with a wildcard import can lead to subtle errors—it's considered a dangerous practice that you should avoid.    The following session is a safe use of a wildcard import:In [1]: e = 'hello'In [2]: from math import *In [3]: eOut[3]: 2.718281828459045QUESTION 11 Write a Python program that calculates a weighted arithmetic mean of 4 float-point numbers:    Example: Image transcription textFollow these steps to calculate the weighted arithmetic mean: 1 Assign a weight to each value in the data set:X1 = 1, W1 = 73 X2 = 2, W2 = 378 X3 = 3, W3 = 459 X4 = 4, W4 = 90 2 Compute the numerator of the weightedmean formula. Multiply each sample by its weight and then add the products together: [w, X , = w, ... Show more The resulting weighted arithmetic mean of the dataset is 2.566 QUESTION 12 Write a program in Python to read N integer numbers, and another number X (where N is a positive integer number and X is an integer number provided by the user) and present the following information from the dataset: The largest number in the datasetThe smallest number in the datasetHow many times X appear in the provided dataset TO PAY ATTENTION!!N has to be a not-null positive integer numberAll numbers in the dataset (including X) are integer numbers, i.e., they could be negative or null as well Example: N = 10X = 1Dataset:  -1, 0, 1, 8, -48, 1, 77, 4, 20, 99 largest: 99smallest: -48# of occurences of X: 2 Attach File    QUESTION 13 Write a program in Python that prints a square of asterisks (*) of size N, i.e., NxN.   Example: N = 5 ************************* Attach File   QUESTION 14 Complete the code below in Python to create a function that determines how many seconds are between two timestamps in the format (Hour:Minute:Second)  Snippet of code: def ElapsedTime(H1, M1, S1, H2, M2, S2):    # add your code here # first time stampH1 = int(input())M1 = int(input())S1 = int(input()) # second time stampH2 = int(input())M2 = int(input())S2 = int(input()) print("Elapsed time between time stamps: ", end="")print(ElapsedTime(H1, M1, S1, H2, M2, S2)) Attach File              Computer ScienceEngineering & TechnologyPython ProgrammingCOSC 3318Share Question

Don't use plagiarized sources. Get Your Custom Essay on
Please help, I will leave a good review QUESTION 1 The value of the…
Just from $13/Page
Order Essay

Leave a Reply

Your email address will not be published.

Related Post

Open chat
💬 Need help?
Hello 👋
Can we help you?