Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary p-5 and p-6 python programming language

Rating
-
Sold
-
Pages
1
Uploaded on
11-05-2023
Written in
2022/2023

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

Institution
Course

Content preview

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.

Written for

Course

Document information

Uploaded on
May 11, 2023
Number of pages
1
Written in
2022/2023
Type
SUMMARY

Subjects

$8.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
rnithish2704

Get to know the seller

Seller avatar
rnithish2704
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
5
Last sold
-
Open You Mind With Nithish

From, My summerrys you will learn many Programming languages and Hacking courses,step by step from beginning. 'If you are a beginner welcome " I will teach you from scratch

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions