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

IBM Python For Data Science Questions And Correct Answers

Document preview thumbnail
Vista previa 2 fuera de 13 páginas

IBM Python For Data Science Questions And Correct Answers...

Vista previa del contenido

IBM Python For Data Science Questions And
Correct Answers


what's the diff btwn / and // in python? ANSWER the single one always result in float
while double slash result in integer



run code in Jupyter ANSWER Shift + enter



import sys

print(sys.version) ANSWER Find which version of python u are using in jupyter



sys is a module which includes lots of system specific parameters and functions
including Python version being used. Before using it. - ANSWER we must explicitly
import it.



In python to write comments use the. symbol - ANSWER hash



The. message in tells you: 1. where the error occurred (more useful in large notebook
cells or scripts), and 2. what kind of error it was (NameError) - ANSWER
error.message in python



Python is what is called an,,,,,,,,,,,,,language. Compiled languages examine your entire
program at compile time, and are able to warn you about a whole class of errors prior to
execution. Instead, Python reads your script line by line when it runs your program.
Python will then terminate the execution of the whole program in case of finding an error
this is, if that error is an unexpected one - and hence, not handled - by the programmer,
something that we'll consider in more advanced detail later on during the course. -
ANSWER interpreted language



Object-oriented Python language

, There are many different types of objects in Python.such as - ANSWER strings,
integers and floats.



strings, integers and floats. float(x) does what - ANSWER cast x to flot



Convert string to integer - ANSWER int('1')



String, we can index string using numbers Musa[1] - ANSWER indexing



Replicate String = 3* Names - ANSWER NamesNamesNames



Names.Find('isa').find substring. - ANSWER the method finds starting index of a
substring



Find number of character : len("Michael Jackson") - ANSWER find length of charcter



Slicing : We can get more than one characters in a string by slicing. NAME = "TIJJANI"

○ - ANSWER NAME[0:4] = TIJJ



Concatenate String IN PYTHON - ANSWER Statement = Name + "is the best"



replace the old substring with the new target substring is the segment has been found in
the string

A = "Michael Jackson is the best"

B = A.replace('Michael', 'Janet') - ANSWER Replace method:



find the first index of the sub-string - ANSWER G.find('snow')

Información del documento

Subido en
18 de enero de 2025
Número de páginas
13
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$14.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.
Easton
3.9
(124)
Vendido
606
Seguidores
221
Artículos
28026
Ú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