Study from the beginning of Python Hour1: Hello World

Studying Python Hour1: Hello World

Learning materials

environment

Basics

Installation

Start Python

Hello World

variable

  >>>###Calculate by substituting 10 for the variable hogeo
  >>> hogeo=10
  >>>
  >>> hogeo+5
  15
  >>>###Variables can be retrieved many times
  >>> hogeo *20
  200
  >>>###Variables can be overwritten
  >>> hogeo=5
  >>> hogeo+10
  15
  >>>
>>>###A crappy example of price calculation
>>> price=100
>>> price*1.1
110
>>>
>>>###A good example using constants
>>> price=100
>>> TAX_RATE=1.08
>>> price * TAX_RATE
108.0
>>>

Variable type / type conversion

>>> firstname='hogeo'
>>> lastname='matsumo'
>>> name=firstname+' '+lastname
>>> print(name)
hogeo matsumo
>>>
>>> price = 100
>>> 'Price:' + price + 'yen'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: can only concatenate str (not "int") to str
>>>
>>> price = 100
>>> 'Price:' + str(price) + 'yen'
'Price:100yen'
>>>

Summary of basics

For Quotations / Lightning Talk

Recommended Posts

Study from the beginning of Python Hour1: Hello World
Study from the beginning of Python Hour8: Using packages
Learning notes from the beginning of Python 1
Learning notes from the beginning of Python 2
Study from Python Hour4: Object-oriented ②
Study from Python Hour3: Functions
Study from Python Hour4: Object-oriented ①
Learn Nim with Python (from the beginning of the year).
First Python 3 ~ The beginning of repetition ~
Existence from the viewpoint of Python
Study from Python Hour2: Control statements
[Python] Web application from 0! Hands-on (2) -Hello World-
Omit BOM from the beginning of the string
Shout Hello, Reiwa! At the beginning of Reiwa
Get the contents of git diff from python
Python 1 person study session: 1st "Running Python ~" Hello world ""
Study from Python Hour7: How to use classes
Study from Python Reading and writing Hour9 files
Say hello to the world with Python with IntelliJ
Finding the beginning of Abenomics from NT magnification 2
Finding the beginning of Abenomics from NT magnification 1
the zen of Python
The wall of changing the Django service from Python 2.7 to Python 3
Mathematical understanding of principal component analysis from the beginning
Get the return code of the Python script from bat
Python points from the perspective of a C programmer
Towards the retirement of Python2
Python starting with Hello world!
About the features of Python
The Power of Pandas: Python
Different from the import type of python. from A import B meaning
What beginners learned from the basics of variables in python
[Python] The stumbling block of import
Python beginners tried Hello World in 30 seconds using the micro-framework Flask
The world of control engineering books
DJango Memo: From the beginning (preparation)
pyenv-change the python version of virtualenv
From building a Python environment for inexperienced people to Hello world
I want to output the beginning of the next month with Python
Change the Python version of Homebrew
Use python on Raspberry Pi 3 to illuminate the LED (Hello World)
[Python] Get the update date of a news article from HTML
[Note] Hello world output with python
[Python] Understanding the potential_field_planning of Python Robotics
cout << "Hello, World! \ N" in python
Review of the basics of Python (FizzBuzz)
Use the Flickr API from Python
From the introduction of JUMAN ++ to morphological analysis of Japanese with Python
I'll get rid of every single imperial system from the world!
Important unit seen from the Python lecture materials of Kyoto University
Python #Hello World for super beginners
List of disaster dispatches from the Sapporo City Fire Department [Python]
About the basics list of Python basics
Carefully derive the interquartile range of the standard normal distribution from the beginning
Basic study of OpenCV with Python
Learn the basics of Python ① Beginners
[Python] I tried to reproduce the emergency escape program to return from the world to return from the modified world of "The disappearance of Haruhi Suzumiya"
Comparing R, Python, SAS, SPSS from the perspective of European data scientists
Study from Python Hour6: Frequently used data types: tuple type, set type, dictionary type
C language to see and remember Part 1 Call C language from Python (hello world)
What kind of book is the best-selling "Python Crash Course" in the world?