What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-27 21:25:09
python odd or even
# Python program to check if the input number is odd or even. # A number is even if division by 2 gives a remainder of 0. # If the remainder is 1, it is an odd number. num = int(input("Enter a number: ")) if (num % 2) == 0: print("{0} i... Add solution -
-
Python 2022-03-27 13:05:30
how to activate virtual environment in python
#------FOR LINUX/MAC---------# #installing venv sudo apt-get install python3.6-venv #creating virtual env python3 -m venv env #activating virtual env source env/bin/activate #-------FOR WINDOWS----------# #installing venv py -m pip install --user virtu... Add solution -
Python 2022-03-27 09:40:13
python 3.7 anaconda
conda install python=3.7 anaconda=custom Add solution -
Python 2022-03-27 08:40:03
how to playsound in python
#TO playsound in your python code you need to install play sound module. # To install playsound moudule- #(1). Open Terminal #(2). "In terminal only" type "pip install playsound" # After installing playsound you need to write- import ... Add solution -
Other 2022-03-27 06:20:31
smallest and largest number
# Python program to find largest # number in a list # list of numbers list1 = [10, 20, 4, 45, 99] # sorting the list list1.sort() # printing the last element print("Largest element is:", list1[-1]) Add solution -
Python 2022-03-27 01:50:04
how to reverse word order in python
## initializing the string string = "I am a python programmer" ## splitting the string on space words = string.split() ## reversing the words using reversed() function words = list(reversed(words)) ## joining the words and printing print(" ... Add solution
Best helpers
Ranking is empty