Computers and Technology, 14.03.2022 18:50, HammondE
You are given a dictionary consisting of word pairs. Every word is a synonym of the other word in its pair. All the words in the dictionary are different.
After the dictionary there's one more word given. Find a synonym for it.
Python
dict = {}
times = int(input())
for _ in range(times):
a = input()
w1, w2 = a. split()
dict[w1] = w2
dict[w2] = w1
print(dict[input()])
How can I further condense this code?
Answers: 3
Computers and Technology, 23.06.2019 01:50, rhonda45801
Free points just awnser this. what should i watch on netflix
Answers: 2
Computers and Technology, 24.06.2019 02:00, akatherine1738
What is a loop? a. a collection of function definitions at the top of a program b. a line of code that defines a variable and assigns it a value c. a program that opens the turtle graphics window d. a block of code that repeats a specific number of times
Answers: 1
You are given a dictionary consisting of word pairs. Every word is a synonym of the other word in it...
English, 18.07.2019 06:40
Mathematics, 18.07.2019 06:40
Mathematics, 18.07.2019 06:40
History, 18.07.2019 06:40
Mathematics, 18.07.2019 06:40
English, 18.07.2019 06:40