Computer Science, asked by khandatetanu, 11 months ago

Ruya’s teacher gave her an assignment to practice the spelling of “RAINBOW”. Ruya’s mother helped her in
doing this by spelling each letter as Ruya wrote it in her notebook. If Ruya writes wrong spelling her mother should say "The spelling is wrong"

Sample Input 1:
Enter the first letter:R
Enter the second letter:A
Enter the third letter:I
Enter the fourth letter:N
Enter the fifth letter:B
Enter the sixth letter:O
Enter the seventh letter:W

Answers

Answered by poojan
4

Language used: Python 3.

Program:

correct_answer="RAINBOW"

listt=[]

listt.append(input("Enter the first letter:"))

listt.append(input("Enter the second letter:"))

listt.append(input("Enter the third letter:"))

listt.append(input("Enter the fourth letter:"))

listt.append(input("Enter the fifth letter:"))

listt.append(input("Enter the sixth letter:"))

listt.append(input("Enter the seventh letter:"))

if ''.join(listt)==correct_answer:

   print(correct_answer)

else:

   print("The spelling is wrong")

Learn more:

Write a Python function sumsquare(l) that takes a nonempty list of integers and returns a list [odd,even], where odd is the sum of squares all the odd numbers in l and even is the sum of squares of all the even numbers in l.

brainly.in/question/15473120

Python program to find absolute difference between the odd and even numbers in the inputted number.

brainly.in/question/11611140

Similar questions