Giải Phương Trình Bậc Hai Sử Dụng Python - Gists · GitHub
Có thể bạn quan tâm
Instantly share code, notes, and snippets.
- Download ZIP
- Star (7) You must be signed in to star a gist
- Fork (0) You must be signed in to fork a gist
- Embed Select an option
- Embed Embed this gist in your website.
- Share Copy sharable link for this gist.
- Clone via HTTPS Clone using the web URL.
No results found
Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/ASC689561/7ede0d6a8b8676d553d6be4bcf95b645.js"></script> - Save ASC689561/7ede0d6a8b8676d553d6be4bcf95b645 to your computer and use it in GitHub Desktop.
- Embed Embed this gist in your website.
- Share Copy sharable link for this gist.
- Clone via HTTPS Clone using the web URL.
No results found
Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/ASC689561/7ede0d6a8b8676d553d6be4bcf95b645.js"></script> Save ASC689561/7ede0d6a8b8676d553d6be4bcf95b645 to your computer and use it in GitHub Desktop. Download ZIP Giải phương trình bậc hai sử dụng python Raw ptb2.py This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters| from math import sqrt |
| print("Giải phương trình bậc 2: ax^2 + bx + c = 0") |
| a = float(input("Nhập a: ")) |
| b = float(input("Nhập b: ")) |
| c = float(input("Nhập c: ")) |
| if a == 0: |
| if b == 0: |
| if c == 0: |
| print("Phương trình vô số nghiệm!") |
| else: |
| print("Phương trình vô nghiệm!") |
| else: |
| if c == 0: |
| print("Phương trình có 1 nghiệm x = 0") |
| else: |
| print("Phương trình có 1 nghiệm x = ", -c / b) |
| else: |
| delta = b ** 2 - 4 * a * c |
| if delta < 0: |
| print("Phương trình vô nghiệm!") |
| elif delta == 0: |
| print("Phương trình có 1 nghiệm x = ", -b / (2 * a)) |
| else: |
| print("Phương trình có 2 nghiệm phân biệt!") |
| print("x1 = ", float((-b - sqrt(delta)) / (2 * a))) |
| print("x2 = ", float((-b + sqrt(delta)) / (2 * a))) |
kogt2000 commented Apr 8, 2020
nice!!
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
trinhnv1205 commented Jun 28, 2020
great
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
ThanhTails commented May 28, 2021
Quá hay
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Kuunna commented Jun 24, 2021
nice!!
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
sorae42 commented Nov 13, 2021 • edited Loading Uh oh!
There was an error while loading. Please reload this page.
the perfect code for every "phương trình bậc hai" question
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
thien88828 commented Nov 14, 2021
Xin cảm ơn!
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
thangcamau commented Jun 7, 2022
cảm ơn bạn!
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment You can’t perform that action at this time.Từ khóa » Viết Phương Trình Bậc 2 Python
-
Giải Phương Trình Bậc 2 Trong Python - VietTuts
-
Giải Phương Trình Bậc 2 Một ẩn Bằng Python
-
Giải Phương Trình Bậc 2 Bằng Python | Tìm ở đây
-
Giải Phương Trình Bậc Hai Một ẩn Bằng Python (ax^2 + Bx ... - Freetuts
-
Giải Phương Trình Bậc Hai | How Kteam
-
Viết Hàm Giải Phương Trình Bậc Nhất Và Phương Trình Bậc Hai
-
Python: Giải Phương Trình Bậc 2 | V1Study
-
Giải Phương Trình Bậc Hai Một ẩn Bằng Python (ax^2 + Bx + C = 0)
-
Bài 4 : Vòng Lặp If Else Qua Bài Toán Giải Phương Trình Bậc 2 Với Python
-
Python 15. Bài Tập Giải Phương Trình Bậc 2 Trong Lập Trình Python
-
Bài Tập #Python Tự Luyện | #Kteam #Howkteam - YouTube
-
Viết Chương Trình Giải Phương Trình Bậc 2 Bằng Python - YouTube
-
Python 15. Bài Tập Giải Phương Trình Bậc 2 Trong Lập Trình Python