+ 1
What is the solution to module 7/test case#1?
I've been trying this for days and I don't know what the problem is: car = { 'brand':'BMW', 'year': 2018, 'color': 'red', 'mileage': 15000 } print(car['brand'])
11 odpowiedzi
+ 1
Leila July It states to get input from the user and then output the correct key.
This code will not work as is, you need to complete it!
https://code.sololearn.com/c96KX67BN16r/?ref=app
+ 4
Leila July ,
Due to some confusions I reposted the same code...now changed...👍
+ 3
Leila July ,
Can you show us the code you tried?? To view...
+ 2
Leila July ,
It is working no mistakes...I just copy pasted your code...
Look into it...it is working,
https://code.sololearn.com/cc819Zt6k3c4/?ref=app
+ 2
Leila July ,
Now try this... instead hard-coding...try to give it as user input...
https://code.sololearn.com/cpRWm8dQsZ0C/?ref=app
+ 2
Welcome! I think Riya was trying to point you in the same direction too 👍
+ 2
Ohh sorry I haven't seen that earlier Thank you so much Riya!
+ 1
You should post your code attempt and the task so that others can help you debug it.
+ 1
car = {
'brand':'BMW',
'year': 2018,
'color': 'red',
'mileage': 15000
}
print(car['brand'])
+ 1
Thank you so much Keith, it worked!
0
The expected output is BMW