I understand Python in Japanese!

Arithmetic

import numpy as arithmetic
Pi=arithmetic.pi
range,Shaku,Make a letter,Print,integer,Crush= \
  range, len, str, print, int, hash
true,false, 全てtrueなればtrue, いずれかtrueならばtrue,Maximum value,minimum value= \
  True, False, all, any, max, min
Authenticity= {true:"true",false:"false", "Heliocentrism":"true", "Ptolemaic theory":"false"}
multiplication=lambda instep,B:Instep*B

Single number=  ["Reiichi 2nd San 456,789"[Times] for Times in 範囲(10)]

#Function definition
def han(Formal argument):
Answer= ''
for character in character(Formal argument):
    try:
Answer+=Single number[integer(Character)]
    except ValueError:
Answer+=Character
return answer

def square(number):
return multiplication(number, number)

#Group definition
class shape:
  #Method definition
  def __init__(self,color= "black"):
myself= self
myself.color=color

def what color(myself):
return myself.color+ "color"

#Group inheritance
class yen(Shape):
  #Method definition
  def __init__(self,radius,color= "black"):
myself,Top= self, super
Initialize at higher level=Top().__init__
myself.radius=radius
Initialize at higher level(color)

def area(self):
myself= self
return multiplication(Pi,Square(myself.radius))

#Arithmetic book
for times in range(1,5):
Print('Current',Han(Times), end='')
Print()
Array= [true, true,false]
Print("The scale of the array is",Han(Shaku(Array)))
Print("Fake",Authenticity[True if all is true(Array)])
Print("The heliocentric theory",Authenticity["Heliocentrism"],"To know")
Print(Han([5,9,6,3]),"The maximum value of",Han(Maximum value([5,9,6,3])))
Print('Pi is',Chinese numeral(Pi))
Month=Circle(radius= 2,color= "yellow")
Print('The color of the moon',Month.what color())
Print('The radius of the moon',Han(Month.radius), 'If it is a scale, its area is',Han(Month.area()), "Shaku Sakuya")

The end of the story

Present Ichi Present 2 Present Participation Currently 4
The scale of the array is
False if false
The heliocentric theory can be understood as true
[Five,Nine,Six,three] の最大値はNine
Pi.Ichi 4 I 1 59 2 6 5 9 5 8 7 9 9
The color of the moon is yellow
If the radius of the moon is 2 shaku, the area is 1 2.566, 6th, 7th, 6th, 4th, 59th, 7th, 2nd shaku

Recommended Posts

I understand Python in Japanese!
I wrote python in Japanese
Japanese output in Python
What I learned in Python
Get Japanese synonyms in Python
I wrote Fizz Buzz in Python
I can't install scikit-learn in Python
I tried Line notification in Python
How to handle Japanese in Python
I wrote the stack in Python
I put Python 2.7 in Sakura VPS 1GB.
Python in optimization
CURL in python
I tried to implement PLSA in Python
Metaprogramming in Python
Python 3.3 in Anaconda
Geocoding in python
I tried to implement permutation in Python
Meta-analysis in Python
I made a payroll program in Python!
Unittest in python
Comparison of Japanese conversion module in Python3
I started python
Epoch in Python
Discord in Python
Sudoku in Python
I tried using Bayesian Optimization in Python
DCI in Python
quicksort in python
nCr in python
I can't debug python scripts in Eclipse
N-Gram in Python
Programming in python
I implemented Cousera's logistic regression in Python
Plink in Python
I tried to implement ADALINE in Python
Constant in python
I wanted to solve ABC159 in Python
I tried to implement PPO in Python
Lifegame in Python.
FizzBuzz in Python
StepAIC in Python
N-gram in python
I searched for prime numbers in python
Csv in python
Disassemble in Python
Reflection in Python
Constant in python
nCr in Python.
format in python
Scons in Python3
Puyo Puyo in python
python in virtualenv
PPAP in Python
Quad-tree in Python
I created a password tool in Python.
Reflection in Python
Chemistry in Python
Hashable in python
DirectLiNGAM in Python
LiNGAM in Python