Skip to content

Commit bd1dd67

Browse files
authored
Add files via upload
if n = 1, then his feeling is "I hate it" or if n = 2 it's "I hate that I love it", and if n = 3 it's "I hate that I love that I hate it" and so on.
1 parent f0f43dd commit bd1dd67

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

hulk.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
x = int(input())
2+
love = "I love it"
3+
hate = "I hate it"
4+
love2 = "I love that"
5+
hate2 = "I hate that"
6+
s = ""
7+
for i in range(1,x+1):
8+
if(i!=x):
9+
if(i%2!=0):
10+
if(i==1):
11+
s = s+hate2
12+
else:
13+
s=s+" "+hate2
14+
else:
15+
s = s+" "+love2
16+
elif(i==x):
17+
if(x%2 == 0):
18+
s = s+" "+love
19+
else:
20+
s = s+" "+hate
21+
22+
print(s)

0 commit comments

Comments
 (0)