What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-28 20:16:02
fibonacci recursive python
#Python program to generate Fibonacci series until 'n' value n = int(input("Enter the value of 'n': ")) a = 0 b = 1 sum = 0 count = 1 print("Fibonacci Series: ", end = " ") while(count <= n): print(sum, end = " &quo... Add solution -
Python 2021-09-28 01:43:04
fibonacci sequence in python using a for loop
#Python program to generate Fibonacci series until 'n' value n = int(input("Enter the value of 'n': ")) a = 0 b = 1 sum = 0 count = 1 print("Fibonacci Series: ", end = " ") while(count <= n): print(sum, end = " &quo... Add solution -
Python 2021-09-27 22:55:05
python bottle
Bottle is a WSGI micro web-framework for the Python programming language. It is designed to be fast, simple and lightweight, and is distributed as a single file module with no dependencies other than the Python Standard Library. The same module runs with ... Add solution -
Python 2021-09-27 21:38:04
python help
help() # If this is your first time using Python, you should definitely check out # the tutorial on the Internet at https://docs.python.org/3.8/tutorial/. # Enter the name of any module, keyword, or topic to get help on writing # Python programs and usin... Add solution -
Python 2021-09-27 21:07:02
Is Python call by reference or call by value
If the object is mutable, the object will change. eg: def my_func(my_list): my_list.append(5) print("List printed inside the function: ",my_list) numberlist = [1,2,3] my_func(numberlist) # numberlist here changed since list is mu... Add solution -
Python 2021-09-27 21:00:02
how to calculate the sum of a list in python
# Python code to demonstrate the working of # sum() numbers = [1,2,3,4,5,1,4,5] # start parameter is not provided Sum = sum(numbers) print(Sum) # result is 25 # start = 10 Sum = sum(numbers, 10) print(Sum) # result is 10 +25 = 35 Add solution -
Python 2021-09-27 15:23:04
blinking an led with raspberry pi
import RPi.GPIO as GPIO # IMPORTANT: remember to change the gpio pin (18) also it needs to be programmed in Thonny Python IDE import time #used in raspberry pi model 4 GPIO.setwarnings(False) #NOTE: raspberry pi could be updated, and you might need to ch... Add solution -
Python 2021-09-27 11:22:02
python wordcloud
from wordcloud import WordCloud, STOPWORDS import matplotlib.pyplot as plt text = 'Python Kurs: mit Python programmieren lernen für Anfänger und Fortgeschrittene Dieses Python Tutorial entsteht im Rahmen von Uni-Kursen und kann hier kostenlos g... Add solution -
Python 2021-09-27 00:24:01
python convert two dimensional list to one dimensional
# Python convert 2D into 1D array: import itertools x = [['foo'], ['bar', 'baz'], ['quux'], ("tup_1", "tup_2"), {1:"one", 2:"two"}] print list(itertools.chain(*x)) print [element for sub in x for element in sub] #... Add solution
Best helpers
Ranking is empty