• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 4 fuera de 34 páginas
Examen

INF1511-Beginner-Exam pack.

Document preview thumbnail
Vista previa 4 fuera de 34 páginas

Question 1: What is a correct syntax to output "Hello World" in Python? print("Hello World") Your answer echo("Hello World"); p("Hello World") echo "Hello World" Question 2: How do you insert COMMENTS in Python code? #This is a comment Your answer //This is a comment /*This is a comment*/ Question 3: Which one is NOT a legal variable name? _myvar Your answer my_var my-var Correct answer Myvar Question 4: How do you create a variable with the numeric value 5? Both the other answers are correct Your answer x = int(5) x = 5 INF1511-Beginner-Exam pack. Question 5: What is the correct file extension for Python files? .py Your answer .pyt .pt .pyth Question 6: How do you create a variable with the floating number 2.8? x = float(2.8) Your answer Both the other answers are correct Correct answer x = 2.8 Question 7: What is the correct syntax to output the type of a variable or object in Python? print(type(x)) Your answer print(typeof(x)) print(typeOf(x)) print(typeof x) Question 8: What is the correct way to create a function in Python? def myFunction(): Your answer function myfunction(): create myFunction(): Question 9: In Python, 'Hello', is the same as "Hello" True Your answer False Question 10: What is a correct syntax to return the first character in a string? x = "Hello"[0] Your answer x = "Hello".sub(0, 1) x = sub("Hello", 0, 1) Question 11: Which method can be used to remove any whitespace from both the beginning and the end of a string? trim() Your answer strip() Correct answer len() ptrim() Question 12: Which method can be used to return a string in upper case letters? upper() Your answer toUpperCase() uppercase() upperCase(


Información del documento

Subido en
25 de noviembre de 2021
Número de páginas
34
Escrito en
2021/2022
Tipo
Examen
Contiene
Preguntas y respuestas
$3.89

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Vendido
1102
Seguidores
917
Artículos
2065
Última venta
1 semana hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes

Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.