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
<!DOCTYPE html> | |
<head> | |
<title>Konversi</title> | |
</head> | |
<body> | |
<form action="index.php" method="post"> | |
<table> | |
<tr> | |
<td>NIM</td> | |
<td><input type="text" name="nim"></td> |
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
<!DOCTYPE html> | |
<head> | |
<title>Sistem Diskon</title> | |
</head> | |
<body> | |
<div> | |
Sistem Diskon | |
<form action="tugas2.php" method="post"> | |
<table> | |
<tr> |
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
<?php | |
$angkaAcak = rand(1, 9999999) ; | |
echo "Angka Acak : $angkaAcak <br/>" ; | |
$akar = sqrt(100); | |
echo "Akar angka 100 : $akar <br/>" ; | |
$decimal = 123.6783; | |
echo "Nilai Decimal: $decimal <br/>" ; |
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
<form action="#" method="post"> | |
Nominal Rp. <input type="text" name="nominal" /> <br/> | |
<input type="submit" value="SUBMIT" /> | |
</form> | |
<?php | |
$nominal = isset($_POST["nominal"]) ? $_POST["nominal"] : 0; | |
$format = number_format($nominal,2,",","."); | |
echo "Format Nominal : Rp. $format" ; | |
?> |
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
import random | |
from faker.providers import BaseProvider | |
# Adding a PizzaProvider with 3 methods: | |
# * pizza_name to retrieve the name of the basic pizza, | |
# * pizza_topping for additional toppings | |
# * pizza_shop to retrieve one of the shops available | |
class PizzaProvider(BaseProvider): | |
def pizza_name(self): | |
valid_pizza_names = [ |