程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python, lets have a look

編輯:Python
  1. Write a function score_grade(score), The function takes an argument score, Represents the entered score , The function is used to convert a 100 point score into a grade score : If the score entered is in 90 More than ( contain 90 branch ) Output A; 80 branch -90 branch ( Not included 90 branch ) Output B; 70 branch -80 branch ( Not included 80 branch ) Output C; 60 branch -70 branch ( Not included 70 branch ) Output D; 60 The output is as follows E. Call function , Set the parameters as 95,82,55,63 View output .
  2. Write a function prime_num(rg), The function takes an argument rg, The function is to 0~rg Find the primes in the range , And count the total number of primes .
  3. Demonstrate saving the above two functions as modules , And make an authentication call .


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved