Merge Week 1 #1

Merged
Kenwood merged 10 commits from week-1 into master 2021-01-08 21:14:34 -05:00
1 changed files with 5 additions and 1 deletions
Showing only changes of commit 0b457c6c88 - Show all commits

View File

@ -2,8 +2,12 @@
# Construct a mad lib
class mad_lib:
# Initalize a constructor for python mad lib
def __init__(self, lib):
# lib is a value passed in during the construction of this class
self.text = lib
# Replace %text% with user input
self.text = self.text.replace('%first_name%', self.first_name())
self.text = self.text.replace('%location%', self.location())
self.text = self.text.replace('%whole_number%', self.whole_number())