And we'll see if you try to mess with our functions by providing a string when we want an int, or providing an int when we want a string, you may very well get yelled at and the user will have to retry.
我们可以看到,如果你尝试打乱我们的函数,当想要一个int数时我们提供sting型,或者,当想要一个sting数时我们提供int型,你可能会被吼叫,然后用户不得不重新尝试。
I culled int and as promised, it's going to yell at me by saying "retry."
我不用int数,正如预期的那样,它开始对我大叫,并且说“重试“
And again I say "David," well, it's going to make me retry.
我再次输入“David“,嗯,它将让我重试。
If they type in bogus characters, it's going to yell at them and make them retry, and eventually I'm going to get handed back an int, which I'm storing in n. Well, if I actually want to judge this number based on its magnitude, well, I can say now, "If n is greater than or equal to one."
如果他们键入了不合法的字符,它将对他们叫喊,然后叫他们重试,最终我将,得到一个int数,它是存储在n中的,好的,如果我的确想要根据它的量级来判定这个数字,好的,现在我可以指明,“是否n大于等于1“
应用推荐