1 #!/usr/bin/env python2 #Encoding:utf-83Number = 884 5 forIinchRange (1,6):6num = Int (input ('gusee Number Game (5 chance):'))7 Print('First%s Opportunity'%(i))8 ifnum >Number :9 Print('Big')Ten elifNum <Number : One Print('Small') A elifnum = =Number : - Print('Good') - Break the - ifnum = =Number : - Print('Good Luck') - Print('Welcome to next come on ... .') + Else: - Print('no Good luck') + Print('Welcome to next come on ... .')
1 #!/usr/bin/env python2 #Encoding:utf-83Number = 884 5A = 16 whileA <= 5:7num = Int (input ('gusee Number Game (5 chance):'))8 Print('First%s Opportunity'%(a))9 ifnum >Number :Ten Print('Big') One elifNum <Number : A Print('Small') - elifnum = =Number : - Print('Good') the Break -A + = 1 - - ifnum = =Number : + Print('Good Luck') - Print('Welcome to next come on ... .') + Else: A Print('no Good luck') at Print('Welcome to next come on ... .')
Python 3.5 guess number game