oeasy python0007 print function string display teletypewriter programmer

Mondo Technology Updated on 2024-02-21

Hello World recalls the last content.

Last time, I want to output hello world! It is said to be the romance of the programmed ape

Understand that a string is a string of characters with quotation marks on both sides, which can be single or double quotation marks

Add a **comment of 140 words or less (optional).

So which quotation marks should you choose? Choice of quotation marks.

In python3, using single quotes or double quotes is a string, and it doesn't make a difference if you use anyone!

Add a **comment of 140 words or less (optional).

In Python, single quotes are generally used, after all, single quotes are one shift less than double quotes

Add a **comment of 140 words or less (optional).

But why does Oeasy's Python tutorial use double quotes to refer to strings? Imitate C language.

In C, a single quote denotes a single character'o'Double quotation marks indicate a string"oeasy"Single-character strings are also strings"a"

Add a **comment of 140 words or less (optional).

What is the relationship between Python and C? Endlessly.

C appeared in 1969 and it can be said that C was the master of Python

Add a **comment of 140 words or less (optional).

The playground of Python3 is the half-width symbol written in C.

Note that quotation marks must be in English half-width mode, not Chinese full-width mode

Add a **comment of 140 words or less (optional).

Can strings be added or subtracted? String addition.

String addition is equivalent to flattening

Add a **comment of 140 words or less (optional).

I want to"hello world"Can I add spaces between words? Add spaces.

Hello or world can be added with a space

If you want both words to be complete"hello"with"world"There are no spaces

Add a **comment of 140 words or less (optional).

How to spell it out"hello world"This? Lian Jia.

One space in the middle is fine, but there are quotation marks on both sides of hello world.

Add a **comment of 140 words or less (optional).

I want to output plain text hello world without quotation marks, how do I do it? Direct output.

It stands to reason that in the playground, there should be a display output function to show the output, what is the corresponding English? display

Add a **comment of 140 words or less (optional).

The display root comes from dis not plicare fold not folded.

Not folding is what it means to show.

Add a **comment of 140 words or less (optional).

What happens when you type display? Type display

The system reported another error

Add a **comment of 140 words or less (optional).

Every time you enter a carriage return, whether it's right or wrong, there will be a reaction, and what is the reaction this time?

Add a **comment of 140 words or less (optional).

nameerrorpython3 playground doesn't know display at all, so it's reported nameerrorpython3 programming and talking to us is not the same, it's not to make the meaning clear, but you need to follow the rules of python3 to speak, so that the playground can identify this name, the output function is not display, so what is it? Output.

The English output function is print, isn't this print?

Add a **comment of 140 words or less (optional).

The name error does not appear in the return result, indicating that the playground recognizes the built-in function of print this name.

Playground thinks of print as a built-in function

Add a **comment of 140 words or less (optional).

built-in is the playground has been built and can be used directly, can it really output the romance of the program ape? Let's start with a summary.

This time continue to play in the playground

Understand that a string is a function that gives a string of characters with quotation marks, single quotation marks, double quotation marks, single quotation marks, single quotation marks, double quotation marks, and multiple characters for the output of a string of multiple characters, called print

Add a **comment of 140 words or less (optional).

Doesn't print mean print? Is it really possible to output the romance of a programmer? We'll talk about it next time! Blue Bridge - >>

Related Pages