learning_times = 2
#Judgment by the number of studies
if learning_times > 0:
print("Congratulations, your Python journey has begun!")
** Python ** was born in 1990. Guido van Rossum of the Netherlands was involved in the development project of the educational language "ABC" and then developed ** Python **. However, the development of ** Python ** (Python) started in December 1989 as "Christmas time killing". The development of modern super-major programming languages started in a surprising way.
** Python ** is a general-purpose high-level language with the following features.
--Grammar simplification --Can be written with a small number of lines of code --Code is highly readable, easy to read and easy to write --Available for free on the internet ――The main body is the minimum necessary, and a rich and large-scale tool group specialized in various areas such as standard libraries, third-party libraries, and functions is prepared. --Compatible with many hardware and OS (platform) --You can write programs in object-oriented, imperative, procedural, functional, etc. formats. --A dynamically typed language with reference counting-based automatic memory management (garbage collector)
The main versions of Python are 2.x and 3.x. 2.x has recently expired and the current Python base is 3.x.
version | Release date | Support deadline |
---|---|---|
2.0 | October 16, 2000 | |
2.1 | April 15, 2001 | |
2.2 | December 21, 2001 | |
2.3 | July 29, 2003 | |
2.4 | November 30, 2004 | |
2.5 | September 19, 2006 | |
2.6 | October 1, 2008 | October 29, 2013 |
2.7 | July 4, 2010 | January 1, 2020 |
version | Release date | Support deadline |
---|---|---|
3.0 | December 3, 2008 | January 13, 2009 |
3.1 | June 27, 2009 | April 9, 2012 |
3.2 | February 20, 2011 | February 20, 2016 |
3.3 | September 29, 2012 | September 29, 2017 |
3.4 | March 16, 2014 | March 18, 2019 |
3.5 | September 13, 2015 | September 2020 |
3.6 | December 23, 2016 | December 2021 |
3.7 | June 27, 2018 | June 2023 |
3.8 | October 14, 2019 | October 2024 |
To improve the readability of the code, it is a grammar highlight to display the ** Python ** keywords and each part of the grammar in different colors.
# -*- coding:utf-8 -*-
#1 line comment
"""
Multi-line comment with three double quotes.
"""
'''
Multi-line comment with three single quotes.
'''
class Animal:
"""This is an animal class.
"""
#Animal name
name = ''
#Number of legs
leg_num = 0
def __init__(self, name, leg_num):
self.name = name
self.leg_num = leg_num
def tell_name(self):
"""Outputs animal name information.
"""
print("The name of this animal is:{name}".format(name=self.name))
def tell_leg_num(self):
"""Outputs information on the number of legs.
"""
print("The number of legs of this animal is:{leg_num}".format(leg_num=self.leg_num))
The following is the effect written in VS Code. (With explanation)
Recommended Posts