Skip to content

Instantly share code, notes, and snippets.

@hvnsweeting
Created August 20, 2020 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hvnsweeting/17043f25d141086b428851a451ff1052 to your computer and use it in GitHub Desktop.
Save hvnsweeting/17043f25d141086b428851a451ff1052 to your computer and use it in GitHub Desktop.
Học lập trình PYthon tại TP HCM 2020 08 - bài 1 - https://pymi.vn
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Welcome to pymi.vn\n",
"## Prepare: \n",
"## Install Python\n",
"## Download doc : https://docs.python.org/3/download.html\n",
"### "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## HTML -> giai nen -> mo file index.html"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## wifi pass: lamhoangads"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Lesson 1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"https://docs.python.org/3/tutorial/introduction.html#using-python-as-a-calculator"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Toán\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Cộng trừ nhân chia"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```\n",
">>> 1 + 1\n",
"2\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## `>>>` - prompt : đợi người dùng nhập code "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Cộng (add)"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"1 + 1"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"6"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"1 + 2 + 3"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"124"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"1 + 123 "
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3134768453130969525596643731319"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"2412874981237498231749321743891 + 721893471893471293847321987428"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2412874981237498231749321743891241287498123749823174932174389124128749812374982317493217438914825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"2412874981237498231749321743891241287498123749823174932174389124128749812374982317493217438912412874981237498231749321743891241287498123749823174932174389124128749812374982317493217438912412874981237498231749321743891241287498123749823174932174389124128749812374982317493217438912412874981237498231749321743891 + 2412874981237498231749321743891241287498123749823174932174389124128749812374982317493217438912412874981237498231749321743891241287498123749823174932174389124128749812374982317493217438912412874981237498231749321743891"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2412874981237498231749321743891241287498123749823174932174389124128749812374982317493217438914825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782965149992494999292699728697556496514999249499929269972869755649651499924949992926997286975564965149992494999292699728697556496514999249499929269972869755649651499924949992926997286975564965149992494999292699728697556448257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778296514999249499929269972869755649651499924949992926997286975564965149992494999292699728697556496514999249499929269972869755649651499924949992926997286975564965149992494999292699728697556496514999249499929269972869755644825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877829651499924949992926997286975564965149992494999292699728697556496514999249499929269972869755649651499924949992926997286975564965149992494999292699728697556496514999249499929269972869755649651499924949992926997286975564482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782965149992494999292699728697556496514999249499929269972869755649651499924949992926997286975564965149992494999292699728697556496514999249499929269972869755649651499924949992926997286975564965149992494999292699728697556448257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778296514999249499929269972869755649651499924949992926997286975564965149992494999292699728697556496514999249499929269972869755649651499924949992926997286975564965149992494999292699728697556496514999249499929269972869755644825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877829651499924949992926997286975564965149992494999292699728697556496514999249499929269972869755649651499924949992926997286975564965149992494999292699728697556496514999249499929269972869755649651499924949992926997286975564482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782965149992494999292699728697556496514999249499929269972869755649651499924949992926997286975564965149992494999292699728697556496514999249499929269972869755649651499924949992926997286975564965149992494999292699728697556448257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778296514999249499929269972869755649651499924949992926997286975564965149992494999292699728697556496514999249499929269972869755649651499924949992926997286975564965149992494999292699728697556496514999249499929269972869755644825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877829651499924949992926997286975564965149992494999292699728697556496514999249499929269972869755649651499924949992926997286975564965149992494999292699728697556496514999249499929269972869755649651499924949992926997286975564"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"241287498123749823174932174389124128749812374982317493217438912412874981237498231749321743891482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778224128749812374982317493217438912412874981237498231749321743891241287498123749823174932174389148257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877822412874981237498231749321743891241287498123749823174932174389124128749812374982317493217438914825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782241287498123749823174932174389124128749812374982317493217438912412874981237498231749321743891482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778224128749812374982317493217438912412874981237498231749321743891241287498123749823174932174389148257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877822412874981237498231749321743891241287498123749823174932174389124128749812374982317493217438914825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782241287498123749823174932174389124128749812374982317493217438912412874981237498231749321743891482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778224128749812374982317493217438912412874981237498231749321743891241287498123749823174932174389148257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877822412874981237498231749321743891241287498123749823174932174389124128749812374982317493217438914825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782 + 2412874981237498231749321743891241287498123749823174932174389124128749812374982317493217438914825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782241287498123749823174932174389124128749812374982317493217438912412874981237498231749321743891482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778224128749812374982317493217438912412874981237498231749321743891241287498123749823174932174389148257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877822412874981237498231749321743891241287498123749823174932174389124128749812374982317493217438914825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782241287498123749823174932174389124128749812374982317493217438912412874981237498231749321743891482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778224128749812374982317493217438912412874981237498231749321743891241287498123749823174932174389148257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877822412874981237498231749321743891241287498123749823174932174389124128749812374982317493217438914825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782241287498123749823174932174389124128749812374982317493217438912412874981237498231749321743891482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778224128749812374982317493217438912412874981237498231749321743891241287498123749823174932174389148257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877822412874981237498231749321743891241287498123749823174932174389124128749812374982317493217438914825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782482574996247499646349864348778248257499624749964634986434877824825749962474996463498643487782"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Lớp kết luận: phép cộng thoải mái"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Phép trừ: (subtract) "
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"2 - 1"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"-1"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"1 - 2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Lớp kết luận: trừ sao cũng được "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Phép nhân: multiply (`*`)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"20"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"5 * 4"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"277158028478084561276535212229034408414712304798090472892528341871427245302481551049309694854043222401611131679985001104606383703332243950322581779794468825114487750811186141365542946058358408730754"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"2134983271984271239847281398479823 * 129817423918498237489231749821743129874983127431987498312749821743983127498123749821749812374983127498127498127489174891274918749831247983127498127349812734812984798"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Lớp kết luận: nhân sao cũng được "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Chia (division) `/`"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2.0"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"4 / 2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## `/` - Slash\n",
"### Gạch chéo \n",
"### Gạch xuống\n",
"### Xẹc "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## `\\` - Backslash\n",
"### Xẹc \n",
"### Huyền \n",
"### Ahihi\n",
"### Gạch xuống"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2.0"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"4/2"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"1 + 1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Kiểu dữ liệu (datatype)"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"int"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(2)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"float"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(2.0)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## int - integer /ˈɪntɪdʒə/\n",
"https://www.lexico.com/definition/integer"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"int"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(-1)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"int"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## float - Pronunciation /fləʊt/ "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Số thực "
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(5+3j)"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"5 + 3j"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"5.2213123"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"5.2213123"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Số thực\n",
"## Số hữu tỷ: số có tỷ lệ - có thể biểu diễn dạng tỷ lệ (phân số)\n",
"## Số vô tỷ: không biểu diễn được ở dạng phân sô"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
"import math"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3.141592653589793"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"math.pi"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1.4142135623730951"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"math.sqrt(2)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"1 + 1 == 2"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"False"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"1 + 1 == 3"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"0.1 + 0.1 == 0.2"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"False"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"0.1 + 0.1 + 0.1 == 0.3"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.30000000000000004"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"0.1 + 0.1 + 0.1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Float là kiểu gần đúng, không so sánh == "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"https://pymi.vn/blog/why-not-float/"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## cache Pronunciation /kaʃ/ "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## cash Pronunciation /kaʃ/ "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## resort uk\n",
"/rɪˈzɔːt/ us\n",
"/rɪˈzɔːrt/"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## suite uk\n",
"## /swiːt/ us\n",
"## /swiːt/"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## float"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1.3333333333333333"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"4 /3"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Luỹ thừa (power) `**`"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"8"
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"2 ** 3"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 2 to the power of 3"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1.4142135623730951"
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"2 ** (1/2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## ctrl-C để dừng chương trình đang tính"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Chia lấy phần nguyên\n",
"## Floor division"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2.5"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"5/2"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"5//2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### lấy phần dư - modulo / remainder"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"7 % 5"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1"
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"5 % 2 "
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0"
]
},
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"4 % 2"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Hôm nay là thứ mấy?\n",
"## Thứ 5"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### một trăm ngày nữa là thứ mấy?"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2"
]
},
"execution_count": 41,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"100 % 7"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Giải các bài toán có tính chất chu kỳ"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 2020 - Canh tí?\n",
"## 1269 "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Thiên can\n",
"### canh tân nhâm quý Giáp ất bính đinh mậu kỷ \n",
"## 12 Địa chi\n",
"### Tý sửu dần mão thìn tỵ ngọ mùi thân dậu tuất hợi "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"https://canchi.pymi.vn/"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"https://hvnsweeting.github.io/vue-canchi/"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## BTVN: tính bài này "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(6+7j)"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"2 + 3j + 4 + 4j"
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"complex"
]
},
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(2 + 3j)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## math "
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {},
"outputs": [],
"source": [
"import math"
]
},
{
"cell_type": "code",
"execution_count": 46,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3.141592653589793"
]
},
"execution_count": 46,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"math.pi"
]
},
{
"cell_type": "code",
"execution_count": 47,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.8939966636005579"
]
},
"execution_count": 47,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"math.sin(90)"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1.0"
]
},
"execution_count": 48,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"math.sin(math.pi/2)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1.0"
]
},
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"math.sin(42)**2 + math.cos(42)**2"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment