Learn Lecture ptyhon

Lecture, performance of input

The distribution of scores and judge, someone will ask me, why input statement input use int to enclose it? Obviously, with the first lecture I said above, input is input for the character str, then go and how str as an integer type int numbers to compare it? You can only go into integer type int () a;

If the score is greater than or equal to 90 A, if the score is greater than or equal to 80 B, if the score is greater than or equal to 70 C, if the score is greater than or equal to 60 D, or fail; so sure everyone's problem came, the first 90 meet IF conditions, but it also meets the second and third if the fourth condition ah, how it does not precisely defined?

In fact, ah PYTHON in, if the statement is executed in order to meet the first IF statement, then it will not continue to run down;

if the judge sentences can be if .... else ...., may be if .... elif .... N th elif ..... else ....; this is if the judge sentences, What if, on the print, and if not, then print another Hu result, of course, also be a variety of results;

Guess you like

Origin www.cnblogs.com/11601134hmj/p/10964193.html