Skip to content

Commit

Permalink
How To Print in Colors in Python SO SO SO COOL
Browse files Browse the repository at this point in the history
  • Loading branch information
omarbelkady committed Jul 7, 2021
1 parent 87b8bbc commit e56d694
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
8 changes: 8 additions & 0 deletions Colors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#this is so cool
print("\033[1mThis is in white!")
print("\033[95mThis is in pink!")
print("\033[94mThis is in purple!")
print("\033[93mThis is in yellow!")
print("\033[4mThis is in beige!")
print("\033[96mThis is in light blue!")
print("\033[92mThis is in green!")
7 changes: 7 additions & 0 deletions Functions/SwapWOThirdar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
assembly=int(input("Enter a value for the assembly variable 2526 328 PROG LANG: "))
pintosfavosofpasclover=int(input("Enter a value for the pintosfavosofpasclover or cs375 fanboy: "))
assembly=assembly+pintosfavosofpasclover
pintosfavosofpasclover=assembly-pintosfavosofpasclover
assembly=assembly-pintosfavosofpasclover
print(assembly)
print(pintosfavosofpasclover)
29 changes: 29 additions & 0 deletions Kudos.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#global variable
alpha = 5

class Kudos:
#constructor
def __init__(self):
print("This is a constructor")
pass

#class method
def cat(self, food):
self.food = food
print("This cat likes to eat "+food)

# private variable and aka local
alpha = 6


# Creating an instance of the class
kudos = Kudos()

# Calling the class method cat on the instance
kudos.cat("fish")

#Print the local value of alpha which is 6 NOOOT 5
print("This will not get print out and error "+str(kudos.alpha))

# Print the global value of alpha which is 5 because alpha can be accessed by anyone
print(alpha)
3 changes: 1 addition & 2 deletions makenelanlearnassembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
print("The Favorite Programming Languages of 2-56837")
for i in favlangs:
print(i)

print("AAANNDD THE FAVORITE PARADIGM OF 727225 56837")
print(favParadigm[1])
print(favParadigm[0])

0 comments on commit e56d694

Please sign in to comment.