228k views
1 vote
Write Python expressions using s1, s2, and s3 and operators and * that evaluate to: (a) 'ant bat cod'

User Danmayer
by
7.4k points

1 Answer

5 votes

Given that the correct question is

Write Python expressions using s1, s2, and s3 and operators + and * that evaluate to: (a) 'ant bat cod'

Answer:

s1 = 'ant'

s2 ='bat'

s3 ='cod'

#using string concatenation

s4 = s1 + ' ' + s2 + ' ' +s3

print(s4)

User Artyom Sokolov
by
7.5k points