Cuestiones
ayuda
option
Mi Daypo

TEST BORRADO, QUIZÁS LE INTERESEPHYTON TEST 1

COMENTARIOS ESTADÍSTICAS RÉCORDS
REALIZAR TEST
Título del test:
PHYTON TEST 1

Descripción:
Road to Certification

Autor:
AVATAR

Fecha de Creación:
28/01/2020

Categoría:
Informática

Número preguntas: 22
Comparte el test:
Facebook
Twitter
Whatsapp
Comparte el test:
Facebook
Twitter
Whatsapp
Últimos Comentarios
No hay ningún comentario sobre este test.
Temario:
Which isn't a valid Python code comment? # use comments to describe the function of code ''' comments make code easier to update.''' /*comments make code easier to update.*/.
In Python, strings can contain only letters a-z and A-Z. Falso Verdadero.
Which contains only float? (ignore the commas) Q, W, E, R, T, Y, a, s, d, f -2, -1, -0.5, 0, 0.5, 1, 2 0.1,0. 2, 0.010, -0.883, 0.8882, -5.0009 3, 2, 1, *, +, =, - .
The type() function is used to change from one data type to another. verdadero falso.
What does type(3.55) return? float int str all of the above .
What does type("1024") return? all of the below str float int.
That code is incorrect: $num1=12 _num2=23 #suma=$num1+_num2 print(#suma) How will be the correct answer: $num1=12 _num2=23 suma=$num1+_num2 print(suma) num1=12 _num2=23 suma=num1+_num2 print(suma) num1=12 _num2=23 suma=$num1+_num2 print(#suma) $num1=12 _num2=23 suma=$num1+_num2 print(suma).
In Python we can use the "+" operator to add numbers but not to add strings. verdadero falso.
Which is an example of Python string addition that will run without error? *hola = Hello + World! hola= "Hello " + "World!" hola var= "Hello ' + "World!' all of the above .
What does the Python code: score = "3" + "45" result in? 48 345 TypeError type().
print("Hello World!) will not output the message "Hello World!". What will it result in? TypeError SyntaxError NameError all of the above .
Wich will be the result of the code: nombre = "Pepito Conejo" Nombre = "Numa Nigerio" nomBre = "Fulanito Mengánez" print(nombre) Pepito Conejo Numa Nigerio Fulanito Megánez Pepito Conejo Numa Nigerio Fulanito Megánez Pepito Conejo Numa Nigerio.
Which isn't an example of the proper use of the Python input() function? answer = input("enter your answer please:" ) answer = INPUT(enter your answer: ) answer = input("enter your answer: ") answer = input("give us, your answer ").
answer = input("enter your answer: ") print("10" + answer) 48 1038 10answer TypeError.
answer = input("enter your answer: ") print("You entered " + "enter your answer" ) If user input is 38, what is the output of the above code? TypeError You entered 38 You entered enter your answer SyntaxError.
Using comma separation, we can combine strings and numbers (int & float) in a single Python print() function without a TypeError. Verdadero falso.
Which isn't a properly formatted Python print() function example? print("Welcome the", 3, "year") print("Welcome the", 3 + New students!) print("Welcome the", 3, "New students!") print("Welcome the", 3 , " Year",2020).
Given the code below and entering "Colette" for user_name input: python total_cost = 22.95 user_name = input("Enter your name: ") Choose the print statement that will output: Colette - the total is $ 22.95 for today's purchase print(Colette, "- the total is $", total_cost, "for today's purchase") print(user_name, "- the total is $", total_cost, "for today's purchase") print(Colette, '- the total is $', total_cost, 'for todays purchase') print("user_name", "- the total is $", "total_cost", "for today's purchase").
The code print("I am", 17+ "years old") will output: I am17years old Verdadero falso.
The string method .swapcase() converts from string to integer. Verdadero falso.
name = "skye homsi" name_1 = name.title() name_2 = name_1.swapcase() print(name_2) What is the output from the above code? "Skye Homsi" "SKYE HOMSI" "skye homsi" "sKYE hOMSI" .
name = "SKYE HOMSI" print("Y" in name.lower()) What is the output from the above code? true false "skye homsi" 3.
Denunciar test Consentimiento Condiciones de uso