How many times will the following code print "I love fish c!" ”
While ' C ':
Print (' I love Fish c! ')
Answer: Countless times
How many times will the following code print "I love fish c!" ”
i = 10
While I:
Print (' I love Fish c! ')
i = I-1
Answer: 10 times
Please write an expression equivalent to the < cost < 50
Ten < cost and cost < 50
Python3, can one line write multiple statements?
Answer: Can be separated by semicolons
Python3, can a statement be divided into multiple lines of writing?
A: You can use \ Continued line "() and so on can
How does Python's and operator differ from the C && operator? "This topic is for friends with C or C + + basics."
Ever heard of "short circuit logic (short-circuit logic)"?
| operator |
Description |
Example |
| and |
Boolean "and"-if x is False,x and Y returns false, otherwise it returns the computed value of Y. |
(A and B) returns True. |
| Or |
Boolean "or"-if x is true, it returns true, otherwise it returns the computed value of Y. |
(A or B) returns true. |
| Not |
Boolean "Non"-returns False if X is true. If x is False, it returns true. |
Not (A and B) returns false. |
Improve the second improvement requirement (provide users with three chance attempts, run out of opportunities, or exit loops for user guessing answers) and improve the code of the small turtle in the video.
This article is from the "Champion Small Lemon" blog, please make sure to keep this source http://lemonit.blog.51cto.com/6043645/1597853
Python Fourth Lesson Notes