This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| *version 1.0 | |
| */ | |
| #include <GL/glut.h> | |
| #include <math.h> | |
| #include <GL/gl.h> | |
| void init(){ | |
| glClearColor(0.0,0.0,0.0,0.0); | |
| glMatrixMode(GL_PROJECTION); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| *this program is design by manshu sharma as help to other students you can copy this and display as your project | |
| *step1 :- int rx=80, ry=20, xc=0, yc=ry;// radius x ,radius y center of x = 0 center of y = radius of y | |
| *step2 :- float p=(ry*ry)-(rx*rx*ry)+((0.25)*(rx*rx)); | |
| *step3 :- apply a while loop with condition (2*ry*ry*xc)<=(2*rx*rx*yc) | |
| *step4 :- In that while loop apply two conditions p<0 | |
| *step5 :- while((2*ry*ry*xc)<=(2*rx*rx*yc)){ | |
| * if(p<0){ | |
| * xc++; | |
| * p=p+(2*ry*ry*xc)+(3*ry*ry); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| num=int(input()) | |
| print(int(math.sqrt(num))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Alorithm way | |
| """ | |
| def decimalToBinary(num): | |
| if num>1: | |
| decimalToBinary(num//2) | |
| print(num%2,end="") | |
| pass | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pip._vendor.distlib.compat import raw_input | |
| num=input() #101010101 | |
| print(int(num,2)) | |
| n, k = raw_input().split(" ") | |
| n = int(n) | |
| k = int(k) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def reverse(n): | |
| #Implement Your Code Here | |
| n=str(n) | |
| print(int("".join(reversed(n)))) | |
| n=int(input()) | |
| result = reverse(n) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| num=int(input()) | |
| count=1 | |
| arr=[] | |
| while len(arr)<num: | |
| res=3*count+2 | |
| if res%4!=0: | |
| arr.append(res) | |
| count=count+1 | |
| for i in range(0,len(arr)): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| num=int(input()) | |
| c=int(input()) | |
| if c==1: | |
| res=0 | |
| for i in range(1,num+1): | |
| res=res+num | |
| num=num-1 | |
| print(res) | |
| elif c==2: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| num,g=input().split() | |
| hra=(20*int(num)/100) | |
| da=(50*int(num)/100) | |
| allow=0 | |
| if g == "B": | |
| allow=allow+1500 | |
| elif g == "A": | |
| allow=allow+1700 | |
| else: | |
| allow = allow + 1300 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| num=input() | |
| x=[int(i) for i in num] | |
| e=0 | |
| o=0 | |
| for i in range(0,len(x)): | |
| if x[i]%2==0: | |
| e=e+x[i] | |
| else: | |
| o=o+x[i] | |
| print(e,o) |
OlderNewer