Question

Question 1. What function is used to remove leading and trailing whitespace from a string variable?...

Question 1. What function is used to remove leading and trailing whitespace from a string variable?

   A. trim
   B. strip
   C. remspaces
   D. empty


Question 2. What statement is used to force a loop to stop processing the current iteration and start the next iteration?

   A. continue
   B. break
   C. The for-in loop
   D. While True


Question 3. What function is used to add a value to a list?

   A. end
   B. pop
   C. add
   D. append


Question 4. Which statement gets control of processing when an Exception Error is found in a "try" statement?

   A. catch
   B. except
   C. error
   D. exception


Question 5. What is the most significant purpose for defining and using a Python module?

   A. To store a consistent set of variable values (i.e. constants) that can be used in many programs
   B. To simplify the coding structure
   C. To store functions that can be used by another .py program when the module is imported

   D. To speed up the Python application processing

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Question 1.
trim function is used to remove leading and trailing whitespace from a string variable?

Question 2.
break statement is used to force a loop to stop processing the current iteration and start the next iteration?

Question 3.
append function is used to add a value to a list?

Question 4.
except statement gets control of processing when an Exception Error is found in a "try" statement?

Question 5.
Python module is used to store functions that can be used by another .py program when the module is imported 
Answer:
Option 3
Add a comment
Know the answer?
Add Answer to:
Question 1. What function is used to remove leading and trailing whitespace from a string variable?...
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
  • QUESTION 21 while True: , in Python, can be used to create an infinite loop. True...

    QUESTION 21 while True: , in Python, can be used to create an infinite loop. True False 2 points    QUESTION 22 The Python Framework does inform you where an error occurred True False 2 points    QUESTION 23 ____ is a critical component to being able to store data and information long term. File Access Memory Print function with 2 points    QUESTION 24 Error handling is also known as ___ handling Result Recursion Exception Crash 2 points   ...

  • Question 9 (CO 6) The best way to call the main() function of a program is...

    Question 9 (CO 6) The best way to call the main() function of a program is to code main() a while statement that calls the main() function in each loop an if statement that calls the main() function in each method an if statement that calls the main() function only if the current module is the main module Question 10 (CO 6) A variable that can only be used within the function that defines it is known as a ______...

  • 1) Which of the following is NOT true about a Python variable? a) A Python variable...

    1) Which of the following is NOT true about a Python variable? a) A Python variable must have a value b) A Python variable can be deleted c) The lifetime of a Python variable is the whole duration of a program execution.   d) A Python variable can have the value None.        2) Given the code segment:        What is the result of executing the code segment? a) Syntax error b) Runtime error c) No error      d) Logic error 3) What...

  • QUESTION 1 Which of the following Python variable names has syntax error ? OA. A. CSC121...

    QUESTION 1 Which of the following Python variable names has syntax error ? OA. A. CSC121 OB. B. CSC121 Oc. C. CSC-121 D. None of the above QUESTION 2 What data type will Python use to store the value of num_students ? num_students = 17.0 A. floating point number (i.e. float) OB. B. integer (i.e. int) Oc. string (i.e. str) Od. D. None of the above

  • 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...

  • Question 1 The following function header represents which programming language? double calc_weekly_pay( double hours_worked, double pay_rate)...

    Question 1 The following function header represents which programming language? double calc_weekly_pay( double hours_worked, double pay_rate) Question 1 options: Python A C-based language FORTRAN COBOL Question 2 One of my favorite quotes from Jeanette Wind is "Computational thinking is using abstraction and decomposition when attacking a large complex task or designing a large complex system." This supports using _____________ when developing programs. Question 2 options: Repetition structures Assignment statements Selection structures Functions Question 3 The following assignment statement exhibits which...

  • Questions 1. How to create a comment in python? 2. The way to obtain user input...

    Questions 1. How to create a comment in python? 2. The way to obtain user input from command line 3. List standard mathematical operators in python and explain them 4. List comparison operators in python 5. Explain while loop. Give example 6. Explain for loop. Give example 7. How to create infinite loop? And how to stop it? 8. Explain a built-in function ‘range’ for ‘for’ loop 9. Explain break statement 10. Explain continue statement 11. Explain pass statement 12....

  • *Python* INTRODUCTION: The goal of this programming assignment is to enable the student to practice object-oriented...

    *Python* INTRODUCTION: The goal of this programming assignment is to enable the student to practice object-oriented programming using classes to create objects. PROBLEM DEFINITION: Write a class named Employee that holds the following data about an employee in attributes: name, IDnumber, department, jobTitle The class should have 8 methods as follows:  For each attribute, there should be a method that takes a parameter to be assigned to the attribute. This is known as a mutator method.  For each...

  • Questin 1 (CO 2) Which of the following is not a valid name in python? last_name...

    Questin 1 (CO 2) Which of the following is not a valid name in python? last_name lastName last name lname Question 2 (CO 3) How many times will “Hello World” be displayed after the following code executes? num=2 while num<12:     print("Hello world")     num+=2 2 12 5 4 Question 3 (CO 1) The following code contains an error, what type of error is it and what line number is it? 1 count=1 2 while count<4 3    print("count = ",...

  • help Question 11 The classic five-stage pipeline MIPS architecture is used to execute the code fragments...

    help Question 11 The classic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem. Assume the followings: • The architecture fully supports forwarding, • Register write is done in the first half of the clock cycle; register read is performed in the second half of the clock cycle, • Branches are resolved in the third stage of the pipeline and the architecture does not utilize any branch prediction mechanism, • Register R4 is initially 200....

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