Lesson 1 Python Output!

Hello friends, it’s me, Python_enjoy!
Today we will learn Python output!
Please join the Q group for more contact and communication: 912375846
We will meet our little friend, Xiao Ming!
Xiao Ming: Hello everyone! I am...
Python_enjoy: Stop, stop, stop! You are not important, just live it!
Xiao Ming: %%%

short story

One day, Xiao Ming, who was always late for school, was asked by his teacher to copy the text 10000000000 times. The opportunistic Xiao Ming planned to write "the text 10000000000 times." Okay, you Xiao Ming! We don’t care anyway. But Xiao Ming, who is lazy except for food, doesn’t even want to write a word! Really, what a bad student. Anyway, he finally found you who is smart, hard-working, handsome and handsome balabala!

What to do?

Please use Python to output "text 10000000000 times"

How to do it?

First let’s learn the output statement!
The fixed code should be like this:

print("你想输出的内容")

See it? Simple and efficient, much shorter than C++
Then according to the format, we should write like this:

print("课文10000000000次 ")

That’s OK!

Expand

When you want to output text with double quotes, you should write it like this:

print('他说:“你好!”')

practise

Please type "I love Python!"
You can submit the code to me through the Q group

Summarize

In this section you learned how to use Python to output text. Please review it to avoid forgetting it.

Guess you like

Origin blog.csdn.net/Python_enjoy/article/details/134292397