Int value demo : Int « Data Type « Python

Home
Python
1.2D
2.Application
3.Buildin Function
4.Class
5.Data Structure
6.Data Type
7.Database
8.Development
9.Dictionary
10.Event
11.Exception
12.File
13.Function
14.GUI Pmw
15.GUI Tk
16.Language Basics
17.List
18.Math
19.Network
20.String
21.System
22.Thread
23.Tuple
24.Utility
25.XML
Python » Data Type » IntScreenshots 
Int value demo
Int value demo
 

number = input('Enter a number between and 10')
if number <= 10:
    if number >= 1:
        print 'Great!'
    else:
        print 'Wrong!'
else:
    print 'Wrong!'

           
         
  
Related examples in the same category
1.Define and use intDefine and use int
2.Int: modulus (remainder), power Int: modulus (remainder), power
3. A value as a condition A value as a condition
4.Define and use integerDefine and use integer
5.Convert String to integer (int)
6.Using Python as a Calculator
7.oct and hex function
8.int function
9.convert integers to octal and hexadecimal strings with a string formatting expression:
10.Compare integers using if structures, relational operators and equality operators.Compare integers using if structures, relational operators and equality operators.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.