Skip to content

Instantly share code, notes, and snippets.

View shifatul-i's full-sized avatar
:octocat:
Gitting

Shifatul Islam (Sif) shifatul-i

:octocat:
Gitting
View GitHub Profile
<img src="profile_pic.jpg" alt="Profile Picture">
<!DOCTYPE html>
<html>
<head>
<title>Your Name</title>
</head>
<body>
<h1>Your Name</h1>
<p>About yourself.</p>
phonebook = {}
phonebook["John"] = 938477566
phonebook["Jack"] = 938377264
phonebook["Jill"] = 947662781
print(phonebook)
print()
phonebook = {
"John" : "3-3-3",
"Jack" : "4-4-4",
class MyClass:
variable = "blah"
def function(self):
print("The variable is {}.".format(self.variable))
myobject_x = MyClass()
myobject_y = MyClass()
myobject_y.variable = "yackity"
def my_function():
print('Hello From My Function!')
def say_my_name(name):
print('Your name is {}'.format(name))
def sum_two_numbers(a, b):
return a + b
my_function()
count = 0
# Prints out 0,1,2,3,4
while count < 5:
print(count)
count += 1 # This is the same as count = count + 1
primes = [2, 3, 5, 7]
for prime in primes:
print(prime)
# Prints out the numbers 0,1,2,3,4
for x in range(5):
print(x)
# Prints out 3,4,5
name = "John"
if name in ["John", "Rick"]:
print("Your name is either John or Rick.")
name = "John"
age = 23
if name == "John" and age == 23:
print("Your name is John, and you are also 23 years old.")
if name == "Rick":
print("Your name is either John or Rick.")
if name == "John" or name == "Rick":