Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

input a number and print even numbers up to that number

def PrintEven(num):
    x=0
    while(num>0):
        if x%2==0:
            print(x)
            if x==num:
                break;
        x=x+1
            
    
PrintEven(200)
Comment

PREVIOUS NEXT
Code Example
Python :: filtering certain rows in python that contains a part of string 
Python :: how to input a full array in one input in python 
Python :: pytorch torchaudio torchvision cu113 
Python :: remove rows from a dataframe that are present in another dataframe? 
Python :: python C-like structs 
Python :: reverse list in python 
Python :: get dummies pandas 
Python :: 20 minute timer with python 
Python :: normalized histogram pandas 
Python :: python remove everything except numbers from string 
Python :: plotly create plot 
Python :: aws django bucket setting 
Python :: python download images from unsplash 
Python :: python convert datetime to float 
Python :: with function python 
Python :: mean bias error 
Python :: python all list items to lower case 
Python :: check if variable is defined in python 
Python :: request.args.get check if defined 
Python :: columnspan tkinter 
Python :: change folder icon with python 
Python :: convert utm to decimal degrees python 
Python :: dataframe rolling window 
Python :: python check if string contains one of characters list 
Python :: How to take n space separated Integer in a list in python? 
Python :: conditional and in python 
Python :: python use math 
Python :: Total processing python 
Python :: The options auto_now, auto_now_add, and defa ult are mutually exclusive. Only one of these options may be present. 
Python :: append to list at index python 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =