+ 1
I wrote this code but the assignment of value in the dictionary seems haunt me.. Can someone help me ?
4 odpowiedzi
+ 1
for key,val in system_elements.items():
if val <= 30:
print("The level of the battery of the ", key, "is lower than 30%")
[Edit] Forgot to add reference:
https://dev-notes.eu/2017/09/iterating-over-dictionary-in-JUMP_LINK__&&__python__&&__JUMP_LINK/
+ 1
Thanks for your help ODLNT ! I didn't know how to do that ! 🙏
+ 1
You're welcome, I glad I was able to help.
+ 1
I tried it and I haven't have the result yet
https://code.sololearn.com/c5cjY9QqGJc0/?ref=app