-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from ajitonelsonn/dev
operasaun komparasaun
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Operasaun Komparasaun | ||
|
||
Operasaun komparasaun iha Python uza operadores ne'ebé permite ita kompara valores no hatudu rezultadu ho valor lógiku (boolean). Lista operadores komparasaun ne'ebé uza iha Python: | ||
|
||
1. `==`: Verifika se valores sira igual. | ||
2. `!=`: Verifika se valores sira la igual. | ||
3. `>`: Verifika se valor bainhira maiór. | ||
4. `<`: Verifika se valor bainhira menus. | ||
5. `>=`: Verifika se valor bainhira maiór ka igual. | ||
6. `<=`: Verifika se valor bainhira menus ka igual. | ||
|
||
Ezemplu sira: | ||
|
||
```python | ||
# Verifika se 5 igual ho 5 | ||
print(5 == 5) # Sai True | ||
|
||
# Verifika se 10 la igual ho 5 | ||
print(10 != 5) # Sai True | ||
|
||
# Verifika se 10 maiór do que 5 | ||
print(10 > 5) # Sai True | ||
|
||
# Verifika se 5 menus do que 10 | ||
print(5 < 10) # Sai True | ||
|
||
# Verifika se 10 igual ka maiór do que 10 | ||
print(10 >= 10) # Sai True | ||
|
||
# Verifika se 5 igual ka menus do que 10 | ||
print(5 <= 10) # Sai True | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Verifika se 5 igual ho 5 | ||
print(5 == 5) # Sai True | ||
|
||
# Verifika se 10 la igual ho 5 | ||
print(10 != 5) # Sai True | ||
|
||
# Verifika se 10 maiór do que 5 | ||
print(10 > 5) # Sai True | ||
|
||
# Verifika se 5 menus do que 10 | ||
print(5 < 10) # Sai True | ||
|
||
# Verifika se 10 igual ka maiór do que 10 | ||
print(10 >= 10) # Sai True | ||
|
||
# Verifika se 5 igual ka menus do que 10 | ||
print(5 <= 10) # Sai True |