Python Exam 1 2023 with 100% correct answers
What is the output of: 11.0//2 5.0 Floor division to the nearest whole number Returns a float What is the output of: 11//2 5 Return an int What is the output of: 11/2 5.5 Returns a float What is the output of: 11/2.0 5.0 What is the output of: 20%2 0 What is the output of: 21%2 1 What is the output of: 11%3 2 x = 'Texas A&M University' x [-3] = ? i x = 'Texas A&M University' x [3] = ? a x = 'Texas A&M University' len(x) = ? 20 x = 'Texas A&M University' x [0:5:2] = ? Txs It starts at 0 and ends at 5, incremented by 2 x = 'Texas A&M University' x [4:] = ? s A&M University x = 'Texas A&M University' x [:4] = ? Texa x = 'Texas A&M University' 'A' in x = ? True Acts as a Boolean, determines if it is in the string x = 'Texas A&M University' 't' in x = ? True
Información del documento
- Subido en
- 28 de julio de 2023
- Número de páginas
- 22
- Escrito en
- 2022/2023
- Tipo
- Examen
- Contiene
- Preguntas y respuestas