Python 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:59:51) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information. >>> import random as rnd >>> rnd.random() 0.13327602492890445 >>> rnd.random() 0.8522591484519338 >>> rnd.random() 0.38337567580919363 >>> rnd.random()*10 5.187771845790326 >>> rnd.random()*10 1.471001807393293 >>> rnd.random()*10 2.3858238429191303 >>> rnd.random()*10 7.105806356810879 >>> (rnd.random()*20)-20 -1.8589687199290665 >>> >>> (rnd.random()*20)-20 -3.112233540597444 >>> (rnd.random()*20)-20 -4.1444337065901635 >>> (rnd.random()*20)-20 -19.072586292796668 >>> (rnd.random()*20)-10 1.5722546948549017 >>> >>> (rnd.random()*20)-10 -2.4148774705208265 >>> (rnd.random()*20)-10 -0.15803158693492136 >>> >>> (rnd.random()*20)-10 0.826443553842001 >>> (rnd.random()*20)-10 1.7325059204775801 >>> rnd.randrange(5,11) 10 >>> myList[2,4,6,8,10] Traceback (most recent call last): File "", line 1, in myList[2,4,6,8,10] NameError: name 'myList' is not defined >>> myLIst=[1,3,10,20,100] >>> rnd.choice(myLIst) 100 >>> rnd.choice(myLIst) 100 >>> rnd.choice(myLIst) 100 >>> rnd.choice(myLIst) 100 >>> rnd.choice(myLIst) 100 >>> rnd.choice(myLIst) 20 >>> rnd.choice(myLIst) 100 >>> rnd.choice(myLIst) 10 >>> rnd.choice(myLIst) 20 >>> rnd.choice(myLIst) 10 >>> rnd.choice(myLIst) 3 >>> rnd.choice(myLIst) 100 >>> rnd.choice(myLIst) 10 >>> rnd.choice(myLIst) 1 >>> sequence="FRIday" >>> rnd.choice(sequence) 'I' >>> rnd.choice(sequence) 'd' >>> rnd.choice(sequence) 'y' >>> rnd.choice(sequence) 'I' >>> rnd.choice(sequence) 'F' >>> rnd.choice(sequence) 'd' >>> rnd.choice("H","T") Traceback (most recent call last): File "", line 1, in rnd.choice("H","T") TypeError: choice() takes 2 positional arguments but 3 were given >>> rnd.choice("HT") 'H' >>> rnd.choice("HT") 'H' >>> rnd.choice("HT") 'H' >>> rnd.choice("HT") 'H' >>> rnd.choice("HT") 'H' >>> rnd.choice("HT") 'H' >>> rnd.choice("HT") 'H' >>> rnd.choice("HT") 'H' >>> rnd.choice("HT") 'H' >>> rnd.choice("HT") 'T' >>> rnd.choice("HT") 'T' >>> rnd.choice("HT") 'T' >>> rnd.choice("HT") 'T' >>> rnd.choice("HT") 'T' >>> rnd.choice("HT") 'T' >>> rnd.choice("HT") 'T' >>> rnd.choice("HT") 'T' >>> rnd.choice("HT") 'H' >>> rnd.choice("HT") 'H' >>> rnd.choice("HT") 'H' >>> rnd.choice("HT") 'H' >>> rnd.choice("HT") 'T' >>> rnd.choice("HT") 'H' >>> ====== RESTART: C:\Users\Bruce Norton\Desktop\emcp_blk_Thursday_040722.py ====== >>> std1=Student("Sally","Scotts") >>> print(std1) Sally Scotts >>> std1.getStanding() 'freshman' >>> std1.advance() >>> std1.advance() >>> std1.getStanding() 'junior' >>> std1.ID 1 >>> = RESTART: C:\Users\Bruce Norton\Desktop\emcp_blk_Thursday_040722.py >>> std1=Student("Sally","Scotts") >>> std2=Student("Roxanne","Allen",3) >>> std2.getID() 2 >>> std2.saySomething("Welcome to EM&CP",std1) Traceback (most recent call last): File "", line 1, in std2.saySomething("Welcome to EM&CP",std1) File "C:\Users\Bruce Norton\Desktop\emcp_blk_Thursday_040722.py", line 76, in saySomething return "Hi {}. My Name is {}. {}.".format(otherStudent.fname,self.fName,something) AttributeError: 'Student' object has no attribute 'fname' >>> = RESTART: C:\Users\Bruce Norton\Desktop\emcp_blk_Thursday_040722.py >>> std1=Student("Sally","Scotts") >>> std2=Student("Roxanne","Allen",3) >>> std2.getID() 2 >>> std2.saySomething("Welcome to EM&CP",std1) 'Hi Sally. My Name is Roxanne. Welcome to EM&CP.' >>> = RESTART: C:\Users\Bruce Norton\Desktop\emcp_blk_Thursday_040722.py >>> cd1=Card(12,4) >>> print(cd1) queen of diamonds >>> cd1.viewCard() 'queen of diamonds' >>> cd1.getCard() '(4,12)' >>> = RESTART: C:\Users\Bruce Norton\Desktop\emcp_blk_Thursday_040722.py >>> myDeck=Deck() >>> myDeck.viewDeck() ace of hearts two of hearts three of hearts four of hearts five of hearts six of hearts seven of hearts eight of hearts nine of hearts ten of hearts jack of hearts queen of hearts king of hearts ace of spades two of spades three of spades four of spades five of spades six of spades seven of spades eight of spades nine of spades ten of spades jack of spades queen of spades king of spades ace of clubs two of clubs three of clubs four of clubs five of clubs six of clubs seven of clubs eight of clubs nine of clubs ten of clubs jack of clubs queen of clubs king of clubs ace of diamonds two of diamonds three of diamonds four of diamonds five of diamonds six of diamonds seven of diamonds eight of diamonds nine of diamonds ten of diamonds jack of diamonds queen of diamonds king of diamonds >>> = RESTART: C:/Users/Bruce Norton/Desktop/emcp_blk_Friday_040822b.py >>> per1=Person("Steve","Beans") >>> print(per1) Steve Beans >>> perHGS1=HGSperson("Sally","Guy") Traceback (most recent call last): File "", line 1, in perHGS1=HGSperson("Sally","Guy") File "C:/Users/Bruce Norton/Desktop/emcp_blk_Friday_040822b.py", line 24, in __init__ Person.__init__(fName,lName) TypeError: __init__() missing 1 required positional argument: 'lName' >>> = RESTART: C:/Users/Bruce Norton/Desktop/emcp_blk_Friday_040822b.py >>> per1=Person("Steve","Beans") >>> print(per1) Steve Beans >>> perHGS1=HGSperson("Sally","Guy") >>> print(perHGS1) HGS Person: Guy,Sally >>> perHGS1.getLast() 'Guy' >>> perHGS1.saySomething() 'Hi. My Name is Sally.' >>> perHGS1.getID() 1 >>>