This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Teach(object): | |
| def __init__(self, master, student): | |
| self.master = master | |
| self.student = student | |
| self.wise = True | |
| def Teaching(self, master, student, wise): | |
| if self.wise: | |
| print("The "+master+" teaches the "+student+".") | |
| else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #compose a list | |
| def creatNumericalList(finish, increment) : | |
| emptyList = [] | |
| for i in range(1, finish, increment): | |
| emptyList.append(i) | |
| return emptyList |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sys import exit | |
| test1 = raw_input("Please enter an integer: ") | |
| test2 = raw_input("Please enter another integer: ") | |
| if (test1.isdigit() and test2.isdigit()) == True: | |
| test1 = int(test1) | |
| test2 = int(test2) | |
| else: |
NewerOlder