Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 1 fuera de 3 páginas
Examen

C859 Python

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

C859 Python f1 = open("/my_path/my_", "r") - answerto open and read a file f1 = open("/my_path/my_", "w") - answerto open and write a file (all previous material discarded) f1 = open("/my_path/my_", "a") - answerto open and add to a file () - answerread a file into a string ("hello!") - answerwrites to a file ine() - answerreads next line () - answercloses a file (must always close a file!) with open("/my_file...etc) as f: - answeropens, allows work, and automatically closes a file timedelta - answertime library function to calculate time amounts from datetime import timedelta - answergrabs timedelta from the datetime library import datetime as dt - answerimports a library as a specified variable ().month - answerto print current month (aka .day or .year for those) beautiful soup - answerHTML parsing library NumPy - answerscientific computing, matrices, array creation library pandas - answerdata manipulation and analysis library pillow (PIL) - answerwork with and manipulate images; python imaging library pyglet - answermultimedia / gaming creation librar

Vista previa del contenido

©EXAM STUDY MATERIAL 8/9/2024 11:50 AM




C859 Python

f1 = open("/my_path/my_file.text", "r") - answer✔✔to open and read a file

f1 = open("/my_path/my_file.text", "w") - answer✔✔to open and write a file (all previous
material discarded)

f1 = open("/my_path/my_file.text", "a") - answer✔✔to open and add to a file

f1.read() - answer✔✔read a file into a string

f1.write("hello!") - answer✔✔writes to a file

f1.readline() - answer✔✔reads next line

f1.close() - answer✔✔closes a file (must always close a file!)

with open("/my_file...etc) as f: - answer✔✔opens, allows work, and automatically closes a file

timedelta - answer✔✔time library function to calculate time amounts

from datetime import timedelta - answer✔✔grabs timedelta from the datetime library

import datetime as dt - answer✔✔imports a library as a specified variable

datetime.date.today().month - answer✔✔to print current month (aka .day or .year for those)

beautiful soup - answer✔✔HTML parsing library

NumPy - answer✔✔scientific computing, matrices, array creation library

pandas - answer✔✔data manipulation and analysis library

pillow (PIL) - answer✔✔work with and manipulate images; python imaging library

pyglet - answer✔✔multimedia / gaming creation library

pytz - answer✔✔time zone data library

pip install ____________ import _______________ - answer✔✔to install and import a library
into your code

Información del documento

Subido en
17 de agosto de 2024
Número de páginas
3
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$10.99

¿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.
Brightstars
3.3
(38)
Vendido
253
Seguidores
7
Artículos
13601
Última venta
6 días 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