A control structure is used to control the flow of execution in a program, based on specified conditions, cs192 python assignment help

QUESTION 1

  1. A control structure is used to control the flow of execution in a program, based on specified conditions.





1 points

QUESTION 2

  1. The while keyword is followed by a(n) ___________, then by a colon which denotes the beginning of the loop’s block of code.
    input function
    control structure
    counter variables
    condition statement

1 points

QUESTION 3

  1. What is the output of the following condition statement if A = 45: A >= “45”
    True
    False
    Error message is displayed

1 points

QUESTION 4

  1. What is the output of the following condition statement if A = 45: A < 45
    True
    False
    Error message is displayed

1 points

QUESTION 5

  1. What is the output of the following condition statement if A = “apple”: A == “apple”
    True
    False
    Error message is displayed

1 points

QUESTION 6

  1. There are three basic programming structures that are used in structured programming. These structures are (choose all that apply):
    Loop
    Sequence
    Condition
    Decision
    Expression

1 points

QUESTION 7

  1. Which of the following types of loops are NOT supported by Python:
    while
    do-while
    for
    Python supports all three.

1 points

QUESTION 8

  1. Debugging is:
    Locating and solving logic errors in our program.
    A process of removing bugs and dust from your computer.
    Removing viruses from your computer.
    Allowing an automated program to resolve your program’s logic errors.

1 points

QUESTION 9

  1. A _______ error results from an error in the formatting of the program’s code.
    Logic
    Syntax
    Run-time
    Library

1 points

QUESTION 10

  1. Which of the following function convert a string to a float in python?
    int(x [,base])
    long(x [,base] )
    float(x)
    str(x)

"Is this question part of your assignment? We can help"

ORDER NOW