python2_switch

1.if實現switch 輸入兩個數字和符號,得出結果python #!/usr/bin/env python # -*- coding: utf-8 -*- while 1: num1 = input("請輸入num1:") oper = raw_input("操做符:") num2 = input("請輸入num2:") if oper == "+":
相關文章
相關標籤/搜索
本站公眾號
   歡迎關注本站公眾號,獲取更多信息