Python Print input int

Source: Internet
Author: User

After learning C language and C language data structure and algorithm to learn python, feel that the core content of programming has not changed, but each programming language has its own characteristics. The goal of this study is to understand the characteristics and usage of Python, to record the BIF (built-in function) usage, and finally to implement some practical uses of Python. Tutorial Video: Little Turtle Python,python version 3.7

Command+n Write page run (F5) execution

The difference between ' and '

Represents a string, no difference. ' Hello ' and ' hello ' are the same for Python. but with "" This, it can be used, like "Let's Go"

1.print ()

>>> ni=3
>>> fa=2
>>> Print (FA)
2
>>> Print (Fa+ni)
5
>>> ni= ' q '
>>> fa= ' W '
>>> Print (NI+FA)
Qw

>>> print (' Ni+fa ')
Ni+fa

Variables are placed directly in print, and text variables are concatenated with the + sign

2.input () display and input can be a=input ()

3. If format

If condition: Condition +:

(tab) Execution statement

(tab) Executes the statement before the tab is executed under the IF condition

.....

Else

(tab) EXECUTE Statement

.......

1 Print('Hi')2temp= input ("Number ?")3guess=Int (temp)4 ifGuess==8:5     Print("Yes")6 Else:7     Print(" on")8 Print(" the")9     

Python Print input int

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.