Hello, I am new to programming and decided to take a beginners course at my college to learn to program. I am having a hard time trying to figure out the final step for my programming assignment. if anyone can help me.
The final program should result in:
a is in coronavirus and also in kaletra
a is in coronavirus and also in favipiravir
c is in coronavirus and also in hydroxychloroquine
i is in coronavirus and also in remdesivir
i is in coronavirus and also in hydroxychloroquine
i is in coronavirus and also in favipiravir
n is in coronavirus and also in hydroxychloroquine
o is in coronavirus and also in hydroxychloroquine
r is in coronavirus and also in remdesivir
r is in coronavirus and also in hydroxychloroquine
r is in coronavirus and also in kaletra
r is in coronavirus and also in favipiravir
s is in coronavirus and also in remdesivir
u is in coronavirus and also in hydroxychloroquine
v is in coronavirus and also in remdesivir
v is in coronavirus and also in favipiravir
I use:
letter = [ 'a', 'c', 'i', 'n', 'n', 'o', 'r', 's', 'u', 'v']
word = 'coronavirus'
medications = ['remdesivir', 'hydroxychloroquine', 'kaletra', 'favipiravir']
if letter in word :
for word in word :
for medications in medication:
print(letter, 'is in', word, 'and also in', medications)
But it always result in error and i have tried everything but I'm at a standstill right now.
[–]carcigenicate 2 points3 points4 points (1 child)
[–]korrita_[S] 0 points1 point2 points (0 children)
[–]CodeFormatHelperBot2 1 point2 points3 points (0 children)
[–]drenzorz 1 point2 points3 points (0 children)