ADVERTISEMENT

One of the works done by our Robotics and Machine Learning division,
SELF-LEVELING QUADCOPTER
Arduino based Quadcopter.
Self-leveling is acheived by the aligning the quadcopter using the readings from the gryo as well as the accelerometer.
A four channel RC transmitter is used to control the movement of the quadcopter when in flight. Kindly subscribe to our YouTube Channel and stay tuned.

Monday 15 August 2016

CSE 1001 : PP2 : Digits Factors

a=input()
n=int(a)
c=0
for i in a[::-1]:
    if(n%int(i)==0):
        c=c+1
        print(i)
if(c==0):
    print("No factors");

CSE 1001 :PP2 : Co Prime ,Mutually Prime

a=int(input())
b=int(input())
flag=0
for p in range(2,min(a,b)):
    if(a%p==0 and b%p==0):
        flag=1;
if(flag==1):
    print("Not coprime")
else:
    print("Coprime")

CSE 1001 :PP2: Liters and MilliLiters

l=0
ml=0
n=int(input())
for i in range(n):
    l=l+int(input())
    ml=ml+int(input())
l=l+int(ml/1000);
ml=ml%1000;
print(l)
print(ml)

CSE1001 :PRACTICE PROBLEM 2:PATTERN PRINTING


n=int(input())
for i in range(1,n+1):
    print("*"*(2*i));

Wednesday 10 August 2016

CSE1002:PP2:IMAGINARY NUMBERS

#include<stdio.h>
#include <stdlib.h>

    int x,y,x1,y1,fx,fy;
int main()
{
  scanf("%d\n%d\n%d\n%d",&x,&y,&x1,&y1);
  add();
  print();
  sub();
  print();
  mul();
  print();
}
void add()
{
    fx=x+x1;
    fy=y+y1;
   
}
void sub()
{
    fx=x-x1;
    fy=y-y1;
}
void mul()
{
    fx=x*x1-y*y1;
    fy=x*y1+y*x1;
}
void print()
{
    if(fy==1)
    printf("%d+i\n",fx);
    else if(fy==-1)
    printf("%d-i\n",fx);
    else
    printf("%d%+di\n",fx,fy);
}

CSE1002:PP2:PLURAL

#include<stdio.h>
#include<string.h>
#include<ctype.h>
void main()
{
    int i;
    char str[20],str1[25];
    scanf("%s",str);
    //printf("%s",str);
    int c=0;
    if(str[strlen(str)-1]=='y')c=1;
    for(i=0;i<strlen(str)-c;i++)
    {
        str[i]=tolower(str[i]);
        str1[i]=tolower(str[i]);
    }
    if(c==1)
    {strcat(str1,"ies");}
    else if(str[strlen(str)-1]=='s' ||(str[strlen(str)-1]=='c' ||str[strlen(str)-1]=='h' )||(str[strlen(str)-1]=='s' ||str[strlen(str)-1]=='h' ))
    {
        strcat(str1,"es");
    }
    else
    strcat(str1,"s");
   
    printf("%s",str);
    printf(" %s",str1);
}

Monday 1 August 2016

CSE1002:OOPS;Practice Problem 1: SPEED

int main()
{
    int m;
    float s;
    scanf("%d\n%f",&m,&s);
    s=roundf(s);
    //printf("%d\n%f",m,s);
    int t=m*60+(int)s;
    float fps=5280.0/t;
    float mps=1609.34/t;
    printf("%.2f fps\n",fps);
    printf("%.2f mps",mps);
}