What do you want to save?
Add Code snippet
New code examples
-
Python 2022-02-01 04:55:44
how to take matrix input in python
# A basic code for matrix input from user R = int(input("Enter the number of rows:")) C = int(input("Enter the number of columns:")) # Initialize matrix matrix = [] print("Enter the entries rowwise:") # For use... Add solution -
Python 2022-02-01 04:20:03
collecting candies codevita solution in python
T = int(input()) arr1 = [] for i in range(0, T): N = int(input()) arr = list(map(int,input().split())) arr.sort() count = arr[0] for i in range(1, len(arr)): count = count + arr[i] arr1.append(count) print(sum(arr1)) Add solution -
Python 2022-01-31 14:11:48
In-place merge two sorted arrays
def merge(X, Y): m = len(X) n = len(Y) # Consider each element `X[i]` of list `X[]` and ignore the element if it is # already in the correct order; otherwise, swap it with the next smaller # element, which happens to be the first e... Add solution -
TypeScript 2022-01-31 12:01:28
2. Write a program to draw this. Assume the innermost square is 20 units per side, and each successive square is 20 units bigger, per side, than the one inside it.
import turtle wn = turtle.Screen() wn.bgcolor("lightgreen") tess = turtle.Turtle() def draw_square(t,size): for i in range(4): tess.forward(size) tess.left(90) size = 20 for j in range(3): tess.pensize(3) draw_square(... Add solution
Best helpers
Ranking is empty