Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Python/ Raptor questions? 1.) To center an output statement, the ^ (caret) symbo

ID: 3909056 • Letter: P

Question

Python/ Raptor questions?

1.)

To center an output statement, the ^ (caret) symbol will be used in the format specifier of the format function.

False

2.)  

The code below is an example of:

# initialize Variables
def initializeVariables():
    global count, howMany, grandTotal, subTotal, tax, totalPrice;
    count = 1;
    howMany = 0;
    grandTotal = 0.00;
    subTotal = 0.00;
    tax = 0.00;
    # end initialize global variables

a loop

a bundle

batch

a function / procedure

3.)

def initializeArrays():

      global grocery, price;

       grocery = [""] * 100;

       price = [0.00] * 100;
      # end initializeArrays function

The above code:

initializes and allocates one location for the grocery name and price

allocates memory for two simple variables called grocery and price

allocates memory to store one simple variable called grocery and an array called price

only allocate consecutive locations to store up to 101 items for grocery name and 101 items for price of the grocery

initializes the grocery item list / array to empty strings and initializes the price list to 0.00; It also, allocate consecutive locations to store up to 101 items for grocery name and 101 items for price of the grocery

4.)  

Which of the following statement is used to divide one number by another and gives the result as a floating-point number?

\

/

//

True

False

2.)  

The code below is an example of:

# initialize Variables
def initializeVariables():
    global count, howMany, grandTotal, subTotal, tax, totalPrice;
    count = 1;
    howMany = 0;
    grandTotal = 0.00;
    subTotal = 0.00;
    tax = 0.00;
    # end initialize global variables

a loop

a bundle

batch

a function / procedure

3.)

def initializeArrays():

      global grocery, price;

       grocery = [""] * 100;

       price = [0.00] * 100;
      # end initializeArrays function

The above code:

initializes and allocates one location for the grocery name and price

allocates memory for two simple variables called grocery and price

allocates memory to store one simple variable called grocery and an array called price

only allocate consecutive locations to store up to 101 items for grocery name and 101 items for price of the grocery

initializes the grocery item list / array to empty strings and initializes the price list to 0.00; It also, allocate consecutive locations to store up to 101 items for grocery name and 101 items for price of the grocery

4.)  

Which of the following statement is used to divide one number by another and gives the result as a floating-point number?

\

/

//

Explanation / Answer

1) False 2) a function / procedure 3) initializes the grocery item list / array to empty strings and initializes the price list to 0.00; It also, allocate consecutive locations to store up to 101 items for grocery name and 101 items for price of the grocery 4) /