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
// Integer. | |
int bulat = 1; | |
// Float. | |
float desimal = 10.5; | |
// Double. | |
double desimal2 = 10.5555555; |
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
# Bilangan bulat. | |
bilangan_bulat = 10 | |
# Bilangan desimal. | |
bilangan_desimal = 10.5555 |
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
print("1") | |
print("2") | |
print("3") | |
print("4") | |
print("5") |
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
1 | |
2 | |
3 | |
4 | |
5 |
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
12345 |
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
1 | |
3 | |
2 | |
5 | |
4 |
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
print("1") | |
print("3") | |
print("2") | |
print("5") | |
print("4") |
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
print("1", end="") | |
print("2", end="") | |
print("3", end="") | |
print("4", end="") | |
print("5", end="") |
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
# Input celcius. | |
celcius = float(input('Suhu celcius: ')) | |
# Konversi ke kelvin. | |
kelvin = celcius + 273 | |
# Konversi ke Reamur. | |
reamur = celcius * 4 / 5 | |
# Konversi ke Fahrenheit. |
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
# Input celcius. | |
celcius = float(input('Suhu celcius: ')) |
OlderNewer