Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What is the sum of any numbers entered by python?
What is the sum of any numbers entered by python?
As follows:

list=[]

What time? True:

Num=input ("Please enter an integer:")

If it is not a number:

Print ('Input is empty, please re-enter!' )

Elif number isdigit ():

Num=int (number)

List.append (number)

Print ('The sum of all the numbers currently entered is: {0}'. Format (sum(list))

Otherwise:

Print ("Input is not an integer, please re-enter!" )

Python:

It was designed by Guido van Rossum of the Netherlands Institute of Mathematics and Computer Science in the early 1960s to replace a language called ABC.

Python provides efficient high-level data structures and can also be used for simple and effective object-oriented programming. Python's syntax and dynamic types, as well as the nature of explanatory language, make it a programming language for writing scripts and developing applications quickly on most platforms. With the continuous updating of the version and the addition of new language functions, it is gradually used for the development of independent large-scale projects.

Python interpreters are easy to extend. You can use C or C++ (or other languages that can be called through C) to extend new functions and data types.

Python can also be used as an extension language in customizable software. Python's rich standard library provides source code or machine code suitable for all major system platforms.