0
National economic freedom ,in intermediate Python (dictionaries ) 5,6 test cases are not executed ,help me to solve
a= input () If a in data: Print(data.get(a)) Else: Print('not found')
4 Respostas
+ 3
some errors at your code.
Like If,Print,Else,
Need indentation also.
Be careful ! python is case sensitive.
I modified it,plz test and check it
a=input()
if a in data:
print (data.get(a))
else:
print ("Not found")
plz write according to problem's given,
Write "Not found".
Actually writing "not found" is not wrong, but it can't pass tests in problem .Coz their desired output is "Not found" ,N with capital letter.
+ 3
But it's python
print(data.get(input(),"Not found"))
+ 1
Thank you
0
Given code is
data = {
'singapore':1,
'ireland:6,
'united Kingdom':7,
'Germany':27,
'america:34,
'united states':17,
'canada':9,
'italy':74
}