Please help me with my assignment I need to submit my homework today.  I have two strings I need to separate in between the two strings. not concatenate it.  Please show me the code as I need to add a third string with the code to separate it to apply for it

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 19RQ
icon
Related questions
Question

Please help me with my assignment I need to submit my homework today.  I have two strings I need to separate in between the two strings. not concatenate it.  Please show me the code as I need to add a third string with the code to separate it to apply for it.

 

prefixes = 'MDFVS'
suffix = 'an'
for letter in prefixes:
#Checking for letter
if letter in 'S':
print(letter + 'c' + suffix)
else:
print(letter+suffix)


while True:
line = input('>')
if line=='done':
break
print(line)
print('Done!')             

 

 the code above didn't work as it didn't print my second string

 

prefixes = 'KTBDPW'
suffix = 'en'
for letter in prefixes:
#Checking for letter
if letter in 'W':
print(letter+'h'+suffix)
else:
print(letter+suffix)

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Problems on Dynamic Programming
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT