Skip to content

Instantly share code, notes, and snippets.

View abu-yusuf-dev's full-sized avatar
🌶️
Making spicy codes

Abu Yusuf abu-yusuf-dev

🌶️
Making spicy codes
View GitHub Profile
@abu-yusuf-dev
abu-yusuf-dev / key_generation_git
Last active January 6, 2019 15:55
Add public ssh key in your git
Open your terminal and hit:
1.ssh-keygen
2.cd ~/.ssh
3.cat id_rsa.pub
4.copy this key that started with ssh-rsa
5.paste here: https://github.com/settings/ssh/new
6.save and bye
@abu-yusuf-dev
abu-yusuf-dev / Finding Median in Python for many Inputs
Created April 21, 2017 08:41
Finding Median in Python for many Inputs.Here user can take as much inputs as he wants.And after that he will get the exact median value..
import statistics
a = [int(x) for x in input().split()]
w=a.sort()
median=statistics.median(a)
print("Median is : %.2lf" %median)
@abu-yusuf-dev
abu-yusuf-dev / Finding Median Value of a List
Last active April 20, 2017 13:57
In This program at first user will take five values.Then the values will be sorted and give the median value.It will also print the larger values and smaller values compared to the median.So, This is the code where you will get the median values.
a = [int(x) for x in input().split()]
p,q,r,s,t=a
w=a.sort()
median=a[2]
l=a[3],a[4]
m=a[0],a[1]
print("Median is : %i" %median)
print("The larger values are: %i %i" %l)
print("The smaller values are: %i %i" %m)
@abu-yusuf-dev
abu-yusuf-dev / Finding Average Value in Python
Last active April 20, 2017 13:43
here , user will take 5 integer value and first two value will be the less than last two values and both will be compared to the middle value......I have tired to solve this.
a=input().split(" ")
x,y,z,p,q=a
r=len(a)
if int(x)<int(z) and int(y)<int(z):
if int(p)>int(z) and int (q)> int (z):
c=(int(x)+int(y)+int(z)+int(p)+int(q))/r
print('Avarage is: %.2lf' %c)
else:
print("Sorry Wrong Input")
@abu-yusuf-dev
abu-yusuf-dev / GradeSystem
Created March 25, 2017 07:39
This is simple grading System developed by Python!
num=int(input(' Please Enter Your Mark: \n'))
if num<=100 and num>=80:
print(' You are a Genious and You got A+ grade!')
elif num<79 and num>75:
print('You got A grade')
elif num < 75 and num > 70:
print('You got A- grade')
elif num < 70 and num > 65:
print('You got B+ grade')
elif num < 65 and num > 60: