What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-13 02:35:16
reading and writing data in a text file with python
#for reading and writing data in a text file with python #First you must have a file Open or create a new file have it loaded in memory. # Open function to open the file "MyFile1.txt" # (same directory) in append mode and file1 = open("My... Add solution -
Python 2021-11-12 14:00:14
python even or odd
# 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 2021-11-11 10:41:18
fabonacci series 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-11-08 04:47:18
python fibonacci while 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-11-07 18:31:14
how to create fibonacci sequence in 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-11-06 06:30:16
create file and write numbers to file in python
##Write a Python program to create a file of numbers ##by taking input from the user and ##then display the content of the file. ##You can take input of non-zero numbers, ##with an appropriate prompt, from the user until the user enters a zero #to cr... Add solution -
Python 2021-11-06 01:04:14
how to find lcm in python
# Python program to find the L.C.M. of two input number # This function computes GCD def compute_gcd(x, y): while(y): x, y = y, x % y return x # This function computes LCM def compute_lcm(x, y): lcm = (x*y)//compute_gcd(x,y) return ... Add solution -
Python 2021-11-04 06:24:12
fibbonachi 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