File tree Expand file tree Collapse file tree 4 files changed +45
-2
lines changed Expand file tree Collapse file tree 4 files changed +45
-2
lines changed Original file line number Diff line number Diff line change 1+ #this is so cool
2+ print ("\033 [1mThis is in white!" )
3+ print ("\033 [95mThis is in pink!" )
4+ print ("\033 [94mThis is in purple!" )
5+ print ("\033 [93mThis is in yellow!" )
6+ print ("\033 [4mThis is in beige!" )
7+ print ("\033 [96mThis is in light blue!" )
8+ print ("\033 [92mThis is in green!" )
Original file line number Diff line number Diff line change 1+ assembly = int (input ("Enter a value for the assembly variable 2526 328 PROG LANG: " ))
2+ pintosfavosofpasclover = int (input ("Enter a value for the pintosfavosofpasclover or cs375 fanboy: " ))
3+ assembly = assembly + pintosfavosofpasclover
4+ pintosfavosofpasclover = assembly - pintosfavosofpasclover
5+ assembly = assembly - pintosfavosofpasclover
6+ print (assembly )
7+ print (pintosfavosofpasclover )
Original file line number Diff line number Diff line change 1+ #global variable
2+ alpha = 5
3+
4+ class Kudos :
5+ #constructor
6+ def __init__ (self ):
7+ print ("This is a constructor" )
8+ pass
9+
10+ #class method
11+ def cat (self , food ):
12+ self .food = food
13+ print ("This cat likes to eat " + food )
14+
15+ # private variable and aka local
16+ alpha = 6
17+
18+
19+ # Creating an instance of the class
20+ kudos = Kudos ()
21+
22+ # Calling the class method cat on the instance
23+ kudos .cat ("fish" )
24+
25+ #Print the local value of alpha which is 6 NOOOT 5
26+ print ("This will not get print out and error " + str (kudos .alpha ))
27+
28+ # Print the global value of alpha which is 5 because alpha can be accessed by anyone
29+ print (alpha )
Original file line number Diff line number Diff line change 33print ("The Favorite Programming Languages of 2-56837" )
44for i in favlangs :
55 print (i )
6-
76print ("AAANNDD THE FAVORITE PARADIGM OF 727225 56837" )
8- print (favParadigm [1 ])
7+ print (favParadigm [0 ])
You can’t perform that action at this time.
0 commit comments