print

2

Given an integer 'n'. Print all the possible pairs of 'n' balanced parentheses. The output strings should be printed in the sorted order considering '(' has higher value than ')'.

By Wooden Hammer Nicholas Olson at May 30 2020

0

def is_sorted(stuff): for i in stuff: if stuff[i+1] > stuff[i]: return True else: return False numbers = [1, 0, 5, 2, 8] print is_sorted(numbers)

By Beginner Kristie Grimes at Oct 08 2020

0

s=0 def sum(x,y): n=int(input("enter no. of terms") for i in range(n): l=int(input("enter no.")) s=s+l print(s) sum()

By Beginner Ed Nicolas at Jun 22 2021

0

print pattern 1 2 3 4 5 6 11 12 13 14 15 21 22 23 24 25 16 17 18 19 20 6 7 8 9 10 in java

By Beginner Wm Dietrich at Mar 10 2021

0

i=int(input("enter the number")); sum=0; pro=1; while(i>0): d=1%10; if (d%2==0): sum=sum+d; else: pro=pro*d; i=i//10; print("sum=",sum,"product=",pro);

By Beginner Devin McGlynn at May 27 2021

0

def batting(balls,runs): points=runs/2; if runs>50: points=points+5; if runs>=100: points=points+10; strikerate=runs/balls; if strikerate>=80 and strikerate<=100: points=points+2; elif strikerate>100: points=points+4; print(points)

By Beginner Handsome Hoopoe at May 16 2020


Related code examples


Code examples by languages