Untitled
unknown
python
4 years ago
326 B
3
Indexable
name_score_dict = {} while True: name=input("請輸入姓名, 輸入x結束").strip() if name.upper() =='X': break score=input("請輸入成績").strip() name_score_dict[name]=score for n in name_score_dict.keys(): if int(name_score_dict[n])<60: print(n,name_score_dict[n])
Editor is loading...