C Programming INPUT test

 C Programming INPUT test

THE SOURCE CODE




#include <stdio.h>
#include <string.h>

int main(){
/* STORING INPUTS*/

char codes[10];
char fname[10];
int numc;
int numb;

//main functions begins form here//

printf("TYPE THE NAME: \n");
scanf("%s", codes);


if (strcmp(codes, "zedonfire")==0){
   printf("You are on the right path %s. \n", codes);
   printf("now type the code: \n");
   scanf("%d", &numc);

   if(numc == 2359){
      printf("VERY GERY FINE\n");
      printf("NOW TYPE THE SECOND CODE:\n");
      scanf("%d", &numb);

      if (numb == 9990){
         printf("YOU HAVE WON THE AMAZING JOURNEY\n");
         printf("NOW TYPE THE FINAL NAME:\n");
         scanf("%s", fname);
         if (strcmp(fname, "FAISAL")==0){
            printf("YOU ARE SUCCEED\n");
            printf("CONGRATULATIONS");
         }
         else
         {
            printf("NO ONE CAN SAVE YOU");
         }
      }
      else
      {
         printf("RUN FOR LIFE");
      }
   }
   else
   {
      printf("NOW ITS TIME TO SEE THE C");
   }
}
else
{
   printf("COME BACK TOMORROW");
}
return 0;
}

PCB DESIGN

Arduino NANO PCB board Design   Using  ALTIUM DESIGN 20.2.2













Arduino Code for 9 LED

ARDUINO ESP8266 Code Runner













             To blink 9 LED with two DIGITAL PIN from ESP8266









 //From ESP8266 we will run 10 LED
int digiPin = 11; 
int digiPin2 = 12;                           
int ledPin = 2; 
int ledPin2 = 3;
int ledPin3 = 4;
int ledPin4 = 5;
int ledPin5 = 6;
int ledPin6 = 7;
int ledPin7 = 8;
int ledPin8 = 9;
int ledPin9 = 10;


// select the pin for the LED
int pinVal = 0; 
int pinVal2 = 0;

void setup()
{
 
  Serial.begin(9600);
  
  pinMode(digiPin, INPUT);
  pinMode(digiPin2,INPUT);
  pinMode(ledPin , OUTPUT);
  pinMode(ledPin2 , OUTPUT);
  pinMode(ledPin3 , OUTPUT);
  pinMode(ledPin4 , OUTPUT);
  pinMode(ledPin5 , OUTPUT);
  pinMode(ledPin6 , OUTPUT);
  pinMode(ledPin7 , OUTPUT);
  pinMode(ledPin8 , OUTPUT);
  pinMode(ledPin9 , OUTPUT);

  
}

void loop() {
   
     pinVal= digitalRead(digiPin);
     Serial.println(pinVal);
     delay(50); 
     pinVal2 = digitalRead(digiPin2);
     Serial.println(pinVal2);
     delay(50);
    if(pinVal ==HIGH)  {

  
    digitalWrite(ledPin, HIGH);
    delay(100);
    digitalWrite(ledPin, LOW);
    delay(100);

    digitalWrite(ledPin2, HIGH);
    delay(100);
    digitalWrite(ledPin2, LOW);
    delay(100);

    digitalWrite(ledPin3, HIGH);
    delay(100);
    digitalWrite(ledPin3, LOW);
    delay(100);
    
    digitalWrite(ledPin4, HIGH);
    delay(100);
    digitalWrite(ledPin4, LOW);
    delay(100);

    digitalWrite(ledPin5, HIGH);
    delay(100);
    digitalWrite(ledPin5, LOW);
    delay(100);

    digitalWrite(ledPin6, HIGH);
    delay(100);
    digitalWrite(ledPin6, LOW);
    delay(100);

    digitalWrite(ledPin7, HIGH);
    delay(100);
    digitalWrite(ledPin7, LOW);
    delay(100);

    digitalWrite(ledPin8, HIGH);
    delay(100);
    digitalWrite(ledPin8, LOW);
    delay(100);


    digitalWrite(ledPin9, HIGH);
    delay(100);
    digitalWrite(ledPin9, LOW);
    delay(100);

  //2nd Row

    digitalWrite(ledPin8, HIGH);
    delay(100);
    digitalWrite(ledPin8, LOW);
    delay(100);

    digitalWrite(ledPin7, HIGH);
    delay(100);
    digitalWrite(ledPin7, LOW);
    delay(100);

    digitalWrite(ledPin6, HIGH);
    delay(100);
    digitalWrite(ledPin6, LOW);
    delay(100);

    digitalWrite(ledPin5, HIGH);
    delay(100);
    digitalWrite(ledPin5, LOW);
    delay(100);

    digitalWrite(ledPin4, HIGH);
    delay(100);
    digitalWrite(ledPin4, LOW);
    delay(100);

    digitalWrite(ledPin3, HIGH);
    delay(100);
    digitalWrite(ledPin3, LOW);
    delay(100);


    digitalWrite(ledPin2, HIGH);
    delay(100);
    digitalWrite(ledPin2, LOW);
    delay(100);

    digitalWrite(ledPin, HIGH);
    delay(100);
    digitalWrite(ledPin, LOW);
    delay(100);



  //2nd part

      digitalWrite(ledPin, HIGH);

      digitalWrite(ledPin3, HIGH);

      digitalWrite(ledPin5, HIGH);

      digitalWrite(ledPin7,HIGH);

      digitalWrite(ledPin9, HIGH);
      delay(500);
  
      digitalWrite(ledPin ,LOW);
    
      digitalWrite(ledPin3 ,LOW);

      digitalWrite(ledPin5 ,LOW);

      digitalWrite(ledPin7 ,LOW);

      digitalWrite(ledPin9 ,LOW);
      delay(500);


      digitalWrite(ledPin2,HIGH);
  
      digitalWrite(ledPin4, HIGH);

      digitalWrite(ledPin6, HIGH);

      digitalWrite(ledPin8,HIGH);

      delay(500);

      digitalWrite(ledPin2 ,LOW);
    
      digitalWrite(ledPin4 , LOW);

      digitalWrite(ledPin6 ,LOW);

      digitalWrite(ledPin8 ,LOW);

      delay(500);




    } 
    else {
      digitalWrite(ledPin ,LOW);
      digitalWrite(ledPin2 ,LOW);
      digitalWrite(ledPin3 ,LOW);
      digitalWrite(ledPin4 , LOW);
      digitalWrite(ledPin5 ,LOW);
      digitalWrite(ledPin6 ,LOW);
      digitalWrite(ledPin7 ,LOW);
      digitalWrite(ledPin8 ,LOW);
      digitalWrite(ledPin9 ,LOW);
    }
    if(pinVal2 ==HIGH){
    digitalWrite(ledPin ,HIGH);
    delay(100);
    digitalWrite(ledPin,LOW);
    delay(100); 

    digitalWrite(ledPin2 ,HIGH);
    delay(100);
    digitalWrite(ledPin2,LOW);
    delay(100); 

    digitalWrite(ledPin ,HIGH);
    delay(100);
    digitalWrite(ledPin,LOW);
    delay(100); 

    digitalWrite(ledPin2 ,HIGH);
    delay(100);
    digitalWrite(ledPin2 ,LOW);
    delay(100); 
 }

 
 else{
  digitalWrite(ledPin,LOW);
}

  
    
  }


Asking Question Code (Python) 2021.04.10

                         THE CODE IS HERE



name1=input("Enter Your Name:\n")
if name1=="faisalzed":
    print("correct")
    set=input("type the code: \n")
    if set=="1590":
        print("RIGHT\n")
        print("meet me at 9")
    else:
        print("BUSTED")    
else:
    print("wrong")

The Very Simple First Code

The Very Simple First Code 


Few weeks back when i first started working on Python in Pycharm IDE .

 [The Code is here]



contacts={
'name': 'MD ZIAUR RAHMAN',
'dob': '02-07-1992',
'email' : 'rehmanzed@gmail.com',
'phone' : '017047777777',
}

password=input("Enter The Passcode: ")
if password=="zed":
set = input("search here please : ")
if (set in contacts):
print(contacts[set])
set1 = input("TRY AGAIN : ")
if (set1 in contacts):
print(contacts[set1])
set2 = input("TRY ANOTHER : ")
if (set2 in contacts):
print(contacts[set2])
set3 = input("TRY LAST ONE : ")
if (set3 in contacts):
print(contacts[set3])
print("THANX A LOT")
else:
print("NOT FOUND")


You will asked to write a code , if its True then the next statement will come one by one .If the input is true then it will print the value which i assigned in the code .






POST

The Very Simple First Code