This is the 13th day of my participation in Gwen Challenge

You’d better bring, cause I’ll bring every I’ve got it. You better pay attention, because I will do my best!

There are Python articles all over the place, and you look up and run into a small editor

Learning Python is more about simplicity, ease of use, and ease of use than C. Python is the second programming language that I have learned. As a self-taught person, the more I feel that language is just a tool after learning Python, and it is easy to learn it. It takes more time and energy to master it, and it may not even achieve the ideal result. Anyway, you never know until you try.

We’ve seen a few Python functions, but writing a few simple programs is not a problem. Small editor in Python123 in the website to find a few of the simplest to try, although not skilled, but finally can run the program is very good, maybe this is to let us continue to learn the power, hey hey.

The temperature converter is a function of the temperature converter.

Portal: Learn Python and explain temperature converters in Python

Conditional output of Hello World

Description takes an integer from the user, and prints “Hello World” referring to the integer value,

Requirement: If the input value is 0, just print “Hello World”

If the input value is greater than zero, print “Hello World” as a two-character line (Spaces are also characters)

If the input value is less than zero, print “Hello World” vertically

The source code:

If n == 0: print("Hello World") elif n > 0: print("He\ NLL \no \nWo\ NRL \nd") else: print("He\ NLL \no \nWo\ NRL \nd") For c in "Hello World":# loop print(c)Copy the code

Of course, there are many ways to do this. For example, you can write a newline after each character without using the for loop.

We start typing a number with something like this (optionally, converted to int) :

#input =input("")#input =input("")#input =input("")#input =input("")Copy the code

Running results:

At the beginning of learning to write code problems is to master the use of each function, so at the beginning of the need to find their own baidu information, or reading a book, focusing on mastering.