-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHow2FormatStringsSimplified.py
30 lines (21 loc) · 1.03 KB
/
How2FormatStringsSimplified.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# target statement:
# "The quick brown fox jumped over the lazy dog."
def FORMATTED_LITERAL_F_STRING():
print(f"The {adjectiveOne} {adjectiveTwo} {nounOne} jumped over the {adjectiveThree} {nounTwo}.")
#TAKES FIVE WORDS, FORMATS THEM INTO THE ICONIC PHRASE
def DOT_FORMATTED_STRING(wordOne,wordTwo,wordThree,wordFour,wordFive):
print("The {} {} {} jumped over the {} {}.".format(wordOne,wordTwo,wordThree,wordFour,wordFive))
adjectiveOne = "quick"
adjectiveTwo = "brown"
adjectiveThree = "lazy"
nounOne = "fox"
nounTwo = "dog"
adjectiveFour = "lively"
adjectiveFive = "anxious"
nounThree = "kitty"
print("The " + adjectiveOne + adjectiveTwo + nounOne + " jumped over the " + adjectiveThree + nounTwo)
print("The {} {} {} jumped over the {} {}.".format(adjectiveOne,adjectiveTwo,nounOne,adjectiveThree,nounTwo))
print(f"The {adjectiveOne} {adjectiveTwo} {nounOne} jumped over the {adjectiveThree} {nounTwo}.")
adjectiveTwo = adjectiveFour
CLASSIC_LINE()
DOT_FORMATTED_STRING(adjectiveFour,adjectiveFive,nounThree,adjectiveOne,nounOne)