Python Exam 2023 with 100% correct answers
Which of the following statements is true about comments in coding? Comments are a form of communication with other programmers (including yourself) In the following line of Python code, what is the argument to the input function? user_status = input("How are you today?") "How are you today?" Which symbol is used to assign a value to a variable in Python? = Which of the following is not a valid variable name in Python? my_2_cents In Python, whole numbers like -3, 5 or 11 are stored as variables of type float. False Which type of loop is best to use when you know in advance how many times the loop will execute? for Given the following code, what is the primary function of the variable i? i=0 while i 10: print("Go Redhawks!") i += 1 loop counter Which of the following is NOT true when interpreting the results of Net Present Value calculations in capital budgeting? Projects with a negative NPV should be accepted A _____________ is a Boolean variable used in the condition to control whether or not to continue looping. flag Statements within the body of a loop execute repeatedly until the condition is: false
Información del documento
- Subido en
- 28 de julio de 2023
- Número de páginas
- 6
- Escrito en
- 2022/2023
- Tipo
- Examen
- Contiene
- Preguntas y respuestas