程序流程

mynumber = 6

while True
     guess = int (input())
     if guess > myNumber:
         print('>')
     elif guess < myNumber:
         print('<')
     else:
         print('')Type "copyright", "credits" or "license()" for more information.
         break

  

Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> 3>2
True
>>> 3<2
False
>>> 3==2
False
>>> 3<>2
SyntaxError: invalid syntax
>>> 3<>2
SyntaxError: invalid syntax
>>> 3!

SyntaxError: invalid syntax
>>> 

  

猜你喜欢

转载自www.cnblogs.com/99-12-23/p/8982433.html
今日推荐