Posts

Showing posts from August, 2019

#6a: Codding In C++ {FACTORIAL FINDER}

Image
#include <iostream.h> int main() { int a,b,c,d; cout<<"Enter number: "; cin>>c; a=1; b=2; for(int i=1;i<c;i++) { d=a*b; a=d; b=b+1; } cout<<c<<" ! = "<<d; return 0; } For PYTHON codes for same CLICK HERE. Download CODES HERE

#4s: Codding in Python {TIC TAK TOE USING TURTLE}

Image
import turtle as t t.setup(350,410) def grid(): t.speed(0) t.fd(200) t.fd(-300) t.fd(100) t.right(-90) t.fd(100) t.bk(300) t.fd(100) t.right(90) t.fd(200) t.fd(-300) t.fd(200) t.right(-90) t.fd(200) t.fd(-300) def rules(): t.pu() t.goto(-155,170) t.pd() t.write('For X use left mouse button, for O use right mouse button.',font=('Arial',9)) t.pu() t.goto(-155,155) t.pd() t.write('X will start first, kindly do not cheat',font=('Arial',9)) rules() t.pu() t.goto(-50,50) t.pd() grid() p1=[] p2=[] def writo(q,w,a,f): print('Player 2 wins') t.pd() t.speed(0) t.pensize(5) t.color('Red') t.pu() t.goto(q,w) t.pd() t.seth(a) t.speed(1) t.fd(f)