• ¿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 1 fuera de 1 páginas
Resumen

Summary p-5 and p-6 python programming language

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

from the previous summerys we will learn deeply about python thank you ..........

Vista previa del contenido

P_05 Coding Exercises for Beginners in Python - Exercise #1

with nithish


Learning Python Programming Language: Exercise on Print Function
In the previous video, we learned how to print something on the
console using Python. Now, let's do an exercise on the print function.
We want to print three lines exactly as shown:

* First line: "First Program - Python Print Function"

* Second line: "It is declared like this: print()"

* Third line: "What to print"

To print this, we simply need to write the statements inside the print
function. The first line is easy, just write "First Program - Python Print
Function" inside the print function. For the second line, write "It is
declared like this: print()" inside the print function. For the third line,
write "'What to print'" (with the single quotes) inside the print function.

Once you have written the code, create a new file called"exercise1.py"
and write the code in there. Then, run the code to see the output.

Using Single Quotes vs Double Quotes

When using the print function, you can enclose the string or message
in either single quotes or double quotes. However, if you want to print
single quotes within your string, you need to be careful. For example,
if you try to enclose the entire string in single quotes and include a
quote within the string, Python will interpret the single quote as the
end of the string and give you an error. To avoid this, you can enclose
the string in double quotes and include the single quotes within the
string.

Información del documento

Subido en
11 de mayo de 2023
Número de páginas
1
Escrito en
2022/2023
Tipo
Resumen
$8.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

Vendido
0
Seguidores
0
Artículos
5
Última venta
-



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