What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-29 15:33:02
python calculate scalene triangle
print("Input lengths of the triangle sides: ") x = int(input("x: ")) y = int(input("y: ")) z = int(input("z: ")) if x == y == z: print("Equilateral triangle") elif x==y or y==z or z==x: print("isos... Add solution -
Python 2021-09-29 09:42:02
speedtest-cli python example
#pip3 install speedtest-cli import speedtest #function that gets the download speed in mega bytes per second def get_final_speed(): rawspeed = speedtest.Speedtest().download() roundedspeed = round(rawspeed) finalspeed = roundedspeed / 1e+6 ... Add solution -
Python 2021-09-28 21:08:02
how to make a python program on odd and 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 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 04:29:03
stress test maximum pairwise product in python
#Uses python3 'trying to work with stress testing' __author__ = 'InnerPeace' import random import argparse #naive solution def maxpairwiseproduct(n, a): assert len(a) == n, "the length of the list is not equal to n = %r" % n assert n ... Add solution -
Python 2021-09-26 00:16:02
Set .discard(), .remove() & .pop() hackerrank solution
n=int(input()) s=set(map(int,input().split())) N=int(input()) for i in range(N): command=input().split() if command[0]=="remove": s.remove(int(command[1])) elif command[0]=="discard": s.discard(int(command[1])) else: ... Add solution -
Python 2021-09-25 04:52:02
Given an integer, , and space-separated integers as input, create a tuple, , of those integers. Then compute and print the result of .
n = int(input()) integer_list =tuple( map(int, input().split())) print(hash(integer_list)) #Return the hash value of the object (if it has one). Hash values are integers. #They are used to quickly compare #dictionary keys... Add solution
Best helpers
Ranking is empty