What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-11 10:01:02
python program big
# Program to check if a number is prime or not num = 407 # To take input from the user #num = int(input("Enter a number: ")) # prime numbers are greater than 1 if num > 1: # check for factors for i in range(2,num): if (num % i... Add solution -
Python 2021-09-11 04:02:04
Triangle Quest
# Triangle Quest in Python - Hacker Rank Solution # Python 3 for i in range(1,int(input())): #More than 2 lines will result in 0 score. Do not leave a blank line also # Triangle Quest in Python - Hacker Rank Solution START print(int(i * 10**i / 9)) ... Add solution -
Other 2021-09-10 07:14:02
find a string hackerrank solution
def count_substring(string, sub_string): count=0 #initialise count variable for i in range(0,len(string)): if string[i:].startswith(sub_string): # basically it traverses from left to right and looks for occurence of substring ... Add solution -
Python 2021-09-09 22:35:02
change each line color as a rainbow python
from matplotlib.pyplot import cm import numpy as np #variable n below should be number of curves to plot #version 1: color=cm.rainbow(np.linspace(0,1,n)) for i,c in zip(range(n),color): plt.plot(x, y,c=c) #or version 2: color=iter(cm.rainbow(np.li... Add solution
Best helpers
Ranking is empty