Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

input a number and print even numbers up to that number in python

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 :: do while python using dates 
Python :: keras backend matrix multiplication 
Python :: Finding Maximum Elements along columns using Python numpy.argmax() 
Python :: django get form id from request 
Python :: pandas get highest values column 
Python :: how to do formatting in python with format function 
Python :: inverse of a matrix with determinant 0 python linalg 
Python :: any() and all() 
Python :: Removing Elements from Python Dictionary Using del keyword 
Python :: Converting categorical variable to numeric variable in python 
Python :: rank function in pandas 
Python :: Python Tkinter CheckButton Widget 
Python :: delete first element of dictionary python 
Python :: how to make a static variable in python 
Python :: change folder name python 
Python :: convert all columns to float pandas 
Python :: smallest possible number in python 
Python :: fill_between matplotlib 
Python :: using csv module how to read perticular lines in csv 
Python :: model.predict knn 
Python :: override get_queryset django with url parameters 
Python :: how to open youtube from google chrome browser instead of internet explorerwhen coding in python 
Python :: tkinter textboxe position 
Python :: difference between 2 dataframes 
Python :: python linear interpolation 
Python :: how can I convert dataframe to list with in python without changing its datatype? 
Python :: rotate array in python 
Python :: torch cos 
Python :: mean pandas 
Python :: remove element from list python by value 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =