• ¿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 3 fuera de 18 páginas
Examen

Python Exam UAH questions with correct answers rated A+ (18)

Document preview thumbnail
Vista previa 3 fuera de 18 páginas

Python Exam UAH questions with correct answers rated A+ (18)

Vista previa del contenido

Python Exam UAH questions with
correct answers rated A+ (18)

Which of the following data types are not supported in Python? - correct answer ✔✔List, Set, Dict, Tuple



Which of the following data types are not supported in Python? - correct answer ✔✔int, string



What is the output of print(str) if str = 'Hello World!'? - correct answer ✔✔Hello World!



What is the output of print(str[0]) if str = 'Hello World!'? - correct answer ✔✔H



What is the output of print(str[2:5]) if str = 'Hello World!'? - correct answer ✔✔llo



What is the output of print(str[2:]) if str = 'Hello World!'? - correct answer ✔✔llo World!



What is the output of print(str * 2) if str = 'Hello World!'? - correct answer ✔✔Hello World!Hello World!



What is the output of print(list) if list=[ 'abcd', 786 ,2.23]? - correct answer ✔✔['abcd', 786, 2.23]



What is the output of print(list[0]) if list =['abcd',786, 2.23]? - correct answer ✔✔abcd



What is the output of print(list[1:3]) if list=['abcd', 786,2.23]? - correct answer ✔✔[786, 2.23]



What is the output of print(list[2:]) if list=[ 'abcd',786, 2.23]? - correct answer ✔✔[2.23]



What is the output of print (tinylist *2) if tinylist = [123, 'john']? - correct answer ✔✔[123, 'john', 123,
'john']

,Which of the following is correct about tuples in Python? - correct answer ✔✔you cant change them



What is the output of print(myTuple) if myTuple =

('abcd',786,2.23)? - correct answer ✔✔('abcd', 786, 2.23)



What is the output of print(myTuple[1:3]) if myTuple=('abcd',786,2.23)? - correct answer ✔✔(786, 2.23)



What is the output of print(myTuple[0]) if myTuple = ('abcd',786,2.23)? - correct answer ✔✔abcd



Which function obtains all the keys from a dictionary? - correct answer ✔✔keys()



Which function obtains all the values from a dictionary? - correct answer ✔✔values()



Which function converts a string to an int? - correct answer ✔✔int()



Which function converts a string to a float? - correct answer ✔✔float()



Which function converts a string to a tuple ? - correct answer ✔✔tuple()



Which function converts a string to a list? - correct answer ✔✔list()



Which function converts a sequence of tuples to dictionary? - correct answer ✔✔dict()



Which function converts an integer to a character? - correct answer ✔✔chr()



Which function converts an integer to an unicode character ? - correct answer ✔✔unichr()



Which function converts a single character to its integer value? - correct answer ✔✔ord(x)

, Which function converts an integer to hexadecimal string ? - correct answer ✔✔hex()



Which operator performs exponential power calculation on operands? - correct answer ✔✔**



Which operator performs the division where the result an integer? - correct answer ✔✔//



Which operator evaluates True when operands refer to the same object? - correct answer ✔✔==



Which operator evaluates True if it does not find a variable sequence? - correct answer ✔✔not in



Which statement stops and transfers to the statement after the loop? - correct answer ✔✔break



Which statement skips the loop & retests prior to reiterating? - correct answer ✔✔continue



Which statement is used when when you do not want any code to execute? - correct answer ✔✔pass



Which function returns a random item from a list, tuple, or string? - correct answer ✔✔choice()



Which function returns a randomly selected element from range? - correct answer ✔✔randrange()



Which function returns a random float between 0 and 1? - correct answer ✔✔random.uniform()



Which function sets the starting value in generating random numbers? - correct answer ✔✔seed()



Which function randomizes the items of a list in place? - correct answer ✔✔random



Which function capitalizes first letter of string? - correct answer ✔✔string.capitalize(0)



Which function checks in a string that all characters are alphanumeric? - correct answer ✔✔isalnum

Información del documento

Subido en
17 de octubre de 2024
Número de páginas
18
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$18.49

¿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.
StuviaExamHub
3.7
(91)
Vendido
499
Seguidores
356
Artículos
26308
Última venta
1 día 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