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 | |
$a = 100; | |
$b = 40; | |
function Minus($a , $b){ | |
return $a - $b; | |
} | |
$r = Minus($a , $b); |
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 | |
$a = 100; | |
$b = 300; | |
$c = 700; | |
$d = 900; | |
function Plus($a , $b , $c , $d){ | |
return $a + $b + $c + $d; | |
} |
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 | |
$a = array(4 , 4 , 5 , 6 , 7); | |
if($a[0] = 4 && $a[3] = 6){ | |
echo "yes, it is"; | |
} | |
else{ |
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 | |
function Division($a , $b , $c){ | |
return $a / $b / $c; | |
} | |
$a = 15; | |
$b = 6; |
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
for i in range(5 , 25): | |
if i > 10 and i < 15: | |
print(i , i * 2) | |
print("done") | |
elif i > 19 and i < 21: | |
print(i , i + 2) | |
print("this") | |
else: | |
print("try again !") | |
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
name = "amir saeid" | |
age = 18 | |
weight = 80.88 | |
print(weight) | |
print(age) | |
name = str(input("please enter your name : ")) | |
print("welcome" + name + "!") |
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
Name = input("please enter your name : ") | |
print("welcome" , Name) | |
Age = int(input("please enter your Age : ")) | |
if Age > 20: | |
print("you can enter ") | |
elif Age < 20: | |
print("you cant enter") | |
else: |
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
List3 = ["amir", 3, 6, 9, True] | |
List4 = [2.2 , 3.2] | |
Number = int(input("please enter the number : ")) | |
if Number > 10: | |
List3.append(Number) | |
print(List3) | |
elif Number < 10: | |
for item in List3: | |
List3.remove(item) |
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 matplotlib.pyplot as plt | |
import numpy as np | |
xpoints = np.array([3 , 6]) | |
ypoints = np.array([7 , 12]) | |
zpoints = np.array([5 , 14]) | |
plt.plot(xpoints , ypoints , zpoints) | |
plt.show() |
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 pandas as pd | |
# pandas DataFrame | |
data = { | |
"prices":[300 , 600 , 900] , | |
"duration":[10 , 20 , 30] | |
} |