← Quay lại bài
Lời giải
Ý tưởng
- Nếu thì in hoa xâu kí tự
ho_ten:ho_ten.upper() - Ngược lại thì in thường xâu kí tự
ho_ten:ho_ten.lower() - Theo yêu cầu của đề bài thì thiết lập hàm như sau:
change(ho_ten,c)
Code đề xuất
```py def change(ho_ten, c): if c==0: return ho_ten.upper() else: return ho_ten.lower() ho_ten=input() c=int(input()) print(change(ho_ten, c))</blockquote>
Công bố ngày: 30/08/2022
