Question

Question 1 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text The statements...

Question 1 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text The statements inside of a Python loop are known as the ____ of the loop. Select one: a. body b. expression c. counter d. block Question 2 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text The Python 3 program below prints the number 3. s = "Python3" print(s[len(s)]) Select one: True False Question 3 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text With built in functions, it is generally acceptable to take a "Leap of Faith". Select one: True False Question 4 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text Will the Python code below print something? And will it terminate? def print_n(s, n): if n > 0: print(s) print_n(s, n-1) return n n = 3 while print_n("hi", n): print_n("there!", n) n = 0 _ _ _ _ Select one: a. no and no b. yes and no c. no and yes d. yes and yes e. syntax error Question 5 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text What is the output of the following Python program? pi = float(3.14159) print (pi) Select one: a. 3 b. 3.0 c. 3.14159 d. 0 Question 6 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text What is the return type of the Python function shown below? isinstance(10.001, float) Select one: a. int b. float c. bool d. string e. NoneType Question 7 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text What output will the following Python commands produce? >>> percentage = float ( 60 * 100) / 55 >>> print (percentage) Select one: a. percentage b. 109 c. 109.0909090909091 d. 109.0 Question 8 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text A stack diagram shows the value of each variable and the function to which each variable belongs. Select one: True False Question 9 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text A development approach that is intended to avoid a lot of debugging by only adding and testing small amounts of code at a time is called: Select one: a. structured development b. incremental development c. unit testing d. Systems development life cycle Question 10 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text What is the output of the Python code below? s = "help" for letter in s[1:]: last = letter break print(last) Select one: a. h b. e c. ! d. p e. l Question 11 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text The following Python 3 code is an example of what principle? bruce = 5 print (bruce,) bruce = 7 print (bruce) Select one: a. Reassignment b. An Iteration or loop structure c. A logical operator d. A conditional expression Question 12 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text What is the value of the variable index after the Python code below is executed? word = 'bAnana' index = word.find('a') Select one: a. 3 b. 1 c. 2 d. 5 e. 0 Question 13 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text What output will the following Python program produce? n = 10000 count = 0 while n: count = count + 1 n = n / 10 n=int(n) print(count) Select one: a. 5 b. 0 c. 10000 d. 1000 Question 14 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text What output will the following Python program produce? def area(l, w): temp = l * w return temp l = 4.0 w = 3.25 x = area(l, w) if ( x ): print (x) Select one: a. 13.0 b. 0 c. Expression does not evaluate to boolean true d. 13 Question 15 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text What output will the following interactive Python statements produce? >>> n = 2 >>> n += 5 >>> n Select one: a. 7 b. 5 c. 0 d. None Question 16 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text What output will the following Python 3 program produce? x = 5 if x % 2 == 0: print (x) else: print (x, x%2) Select one: a. 5 b. 5 1 c. 2 d. 5 0 Question 17 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text The operands of the logical operators should be boolean expressions, but Python is not very strict. Any nonzero number is interpreted as True. Select one: True False Question 18 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text A loop where the terminating condition is never achieved is called _______. Select one: a. an infinite loop b. a universal loop c. a while loop d. a for .. ever loop Question 19 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text What does the following Python 3 function do? def subroutine(n): while n > 0: print (n,) n -= 1 Select one: a. Counts from 10 down to 0 and displays each number b. Counts from n down to 1 and displays each number c. Calculates the sum of n numbers greater than 0 d. Calculates the mean of n Question 20 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text True or False: A local variable is a variable defined inside a function that can only be used inside its function. Select one: True False

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The statements inside of a Python loop are known as the ____ of the loop. Select one: a. body b. expression c. counter d. block

Answer: a) body

Question 2 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text The Python 3 program below prints the number 3. s = "Python3" print(s[len(s)]) Select one: True False

Answer: b) False

This program prints the length of the string "Python3", i.e., 7.

Question 3 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text With built in functions, it is generally acceptable to take a "Leap of Faith". Select one: True False

Answer: True

NOTE: As per HOMEWORKLIB POLICY, I am allowed to answer specific number of questions (including sub-parts) on a single post. Kindly post the remaining questions separately and I will try to answer them. Sorry for the inconvenience caused.

Add a comment
Know the answer?
Add Answer to:
Question 1 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text The statements...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Not yet answered Marked out of 1.00 Flag question Question text What is the value of...

    Not yet answered Marked out of 1.00 Flag question Question text What is the value of the following Python expression? not(True and False) Select one: True False Question 2 Not yet answered Marked out of 1.00 Flag question Question text Consider the following Python program. fin = open('words.txt') for line in fin: word = line.strip() print(word) What does the program loop over? Select one: a. Lines in a file b. Lines in a list c. Words in a dictionary d....

  • Need ASAP JUST answers Question 26 Not yet answered Marked out of 1.00 Not flaggedFlag question...

    Need ASAP JUST answers Question 26 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text Which one of the following principles refers to the assumption that a project will be evaluated based on its incremental cash flows? Select one: a. Forecast assumption principle b. Base assumption principle c. Fallacy principle d. Erosion principle e. Stand-alone principle Question 27 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text Which one of the following refers to...

  • Need ASAP Just Answers Question 6 Not yet answered Marked out of 1.00 Not flaggedFlag question...

    Need ASAP Just Answers Question 6 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text A registered form bond is defined as a bond that: Select one: a. is a bearer bond. b. is held in street name. c. pays coupon payments directly to the owner of record. d. is listed with the Securities and Exchange Commission (SEC). e. is unsecured. Question 7 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text Which one...

  • Question 1 Not yet answered Marked out of 1.00 Flag question Question text SQL is a...

    Question 1 Not yet answered Marked out of 1.00 Flag question Question text SQL is a programming language for web-site development. Select one: a. TRUE b. FALSE Question 2 Not yet answered Marked out of 1.00 Flag question Question text Moral dimensions of the information age do NOT include _____. Select one: a. Information rights and obligations b. Accountability and control. c. Information safety d. Property rights and obligations Question 3 Not yet answered Marked out of 1.00 Flag question...

  • Question 1 Not yet answered Marked out of 1.00 Flag question Question text Which of the...

    Question 1 Not yet answered Marked out of 1.00 Flag question Question text Which of the following keywords is useful for skipping to the next iteration of a loop? Select one: a. do b. break c. switch d. continue e. while Clear my choice Question 2 Not yet answered Marked out of 1.00 Flag question Question text Consider the following line of Java code. System.out.println("Hello, World!"); "out" is which of the following? Select one: a. a statement b. a class...

  • Just Answers Need Asap Question 31 Not yet answered Marked out of 1.00 Not flaggedFlag question...

    Just Answers Need Asap Question 31 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text The Bermuda Triangle Store pays a constant dividend. Last year, the dividend yield was 5.4 percent when the stock was selling for $15 a share. What must the stock price be today if the market currently requires a 3.8 percent dividend yield on this stock? Select one: a. $21.32 b. $12.30 c. $11.59 d. $19.22 e. $22.48 Question 32 Not yet answered...

  • Advance Data and network security Question 12 Not yet answered Marked out of 1.00 Not flaggedFlag...

    Advance Data and network security Question 12 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text Which of the following transport technologies would not be appropriate for cellular backhaul networks? Select one: a. Ethernet b. 3G/4G c. Laser d. T1/E1

  • Need ASAP Just Answers Question 51 Not yet answered Marked out of 1.00 Not flaggedFlag question...

    Need ASAP Just Answers Question 51 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text Bob's is a retail chain of specialty hardware stores. The firm has 21,000 shares of stock outstanding that are currently valued at $68 a share and provide a 13.2 percent rate of return. The firm also has 500 bonds outstanding that have a face value of $1,000, a market price of $1,068, and a 7 percent coupon. These bonds mature in 6...

  • Question 1 Not yet answered Marked out of 1.00 p Flag question Which of the following...

    Question 1 Not yet answered Marked out of 1.00 p Flag question Which of the following is result of decisions based on inaccurate information? Select one: a. Delivering products to customers on time O b. Meeting customers' demands O c. All the answers d. Misallocation of resources Question 2 Not yet answered Marked out of 1.00 p Flag qu In digital firms, Core business processes are accomplished digitally Select one: a. True о b. FALSE Previous page f Question 7...

  • Not yet answered Graded out of 1.00 Flag question Question text In the process of photosynthesis,...

    Not yet answered Graded out of 1.00 Flag question Question text In the process of photosynthesis, water and carbon dioxide are produced. Select one: True False Question 2 Not yet answered Graded out of 1.00 Flag question Question text In the carbon cycle, combustion produces atmospheric oxygen. Select one: True False Question 3 Not yet answered Graded out of 1.00 Flag question Question text In a balanced chemical equation, the number of each type of atom in the reactants must...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT