Skip to content

Instantly share code, notes, and snippets.

View saaeiddev's full-sized avatar
🎯
Focusing

Amir Saeid Dehghan saaeiddev

🎯
Focusing
View GitHub Profile
<?php
$a = 100;
$b = 40;
function Minus($a , $b){
return $a - $b;
}
$r = Minus($a , $b);
<?php
$a = 100;
$b = 300;
$c = 700;
$d = 900;
function Plus($a , $b , $c , $d){
return $a + $b + $c + $d;
}
<?php
$a = array(4 , 4 , 5 , 6 , 7);
if($a[0] = 4 && $a[3] = 6){
echo "yes, it is";
}
else{
<?php
function Division($a , $b , $c){
return $a / $b / $c;
}
$a = 15;
$b = 6;
@saaeiddev
saaeiddev / range.py
Created September 26, 2022 18:24
range
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 !")
@saaeiddev
saaeiddev / health2.py
Created September 24, 2022 15:41
health2
name = "amir saeid"
age = 18
weight = 80.88
print(weight)
print(age)
name = str(input("please enter your name : "))
print("welcome" + name + "!")
@saaeiddev
saaeiddev / health.py
Created September 19, 2022 20:51
health
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:
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)
@saaeiddev
saaeiddev / matplotlib.py
Created September 18, 2022 14:23
matplotlib charts
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()
@saaeiddev
saaeiddev / pandas DataFrame.py
Created September 18, 2022 13:36
pandas DataFrame
import pandas as pd
# pandas DataFrame
data = {
"prices":[300 , 600 , 900] ,
"duration":[10 , 20 , 30]
}