-->

WAP to count all characters after first white space

in turboc++
----------------------------------------------------------------------------------------
//WAP to count all characters after first white space.
#include <stdio.h>
#include<conio.h>
int main ()
{
  char string[100];
  int count=0,i,k;//variables declaration
  printf ("enter string\n");
  scanf ("%[^\n]s", string); //reads till new line is encountered or untill new line is encountered
  for ( i = 0; string[i] != '\0'; i++) //loop execution till the null character is reached.
    {
      if (string[i] == ' ') //condition testing
{
  break; //exits the loop and variable i's last value is taken
}
    }
    for (k=i+1; string[k] != '\0'; k++) //loop execution till the null character is reached from location i+1.
  {
      count++;                         //goes for increment
  }
  printf ("total characte after first space=%d",count);

  getch();
}









-------------------------------
in codeblocks
------------------------------------------------------------
//WAP to count all characters after first white space.
#include <stdio.h>

int main ()
{
  char string[100];
  int count=0,i,k;//variables declaration
  printf ("enter string\n");
  scanf ("%[^\n]s", string); //reads till new line is encountered or untill new line is encountered
  for ( i = 0; string[i] != '\0'; i++) //loop execution till the null character is reached.
    {
      if (string[i] == ' ') //condition testing
{
  break; //exits the loop and variable i's last value is taken
}
    }
    for (k=i+1; string[k] != '\0'; k++) //loop execution till the null character is reached from location i+1.
  {
      count++;                         //goes for increment
  }
  printf ("total characte after first space=%d",count);

  return 0;
}

WAP to print all characters before the first space.

using turboc++
---------------------------------------------------------
//WAP to count all characters after first white space.
#include <stdio.h>
#include<conio.h>
void main()
{
    char string[100];
    printf("enter string\n");
    scanf("%[^\n]s",string);//reads till new line is encountered or untill new line is encountered
    for(int i=0;string[i]!='\0';i++)//loop execution till the null character is reached.
    {
        if(string[i]==' ')//condition testing
        {
           break;             //exits the loop
        }
        else
        {
            printf("%c",string[i]);//prints the character

        }
    }

    getch();
}



------------------------------------------------------------------------------

using codeblocks
--------------------------------------------------

//WAP to count all characters after first white space.
#include <stdio.h>

int main()
{
    char string[100];
    printf("enter string\n");
    scanf("%[^\n]s",string);//reads till new line is encountered or untill new line is encountered
    for(int i=0;string[i]!='\0';i++)//loop execution till the null character is reached.
    {
        if(string[i]==' ')//condition testing
        {
           break;             //exits the loop
        }
        else
        {
            printf("%c",string[i]);//prints the character

        }
    }

    return 0;
}

WAP to initialize some characters and display them.

the code looks like
------------------------------------------------------
//program to initialize some characters and to print them
#include <stdio.h>
#include<conio.h>

void main()
{
    char name[10]={'r','m','a','n'};//initialization of characters
    int i;
    for(i=0;name[i]!='\0';i++)//loop execution untill null character
    {
        printf("%c",name[i]);//printing the value
    }
   

    getch();
}

---------------------------
second method
----------------------------------------------
//program to initialize some characters and to print them
#include <stdio.h>
#include<conio.h>

void main()
{
    char name[10]={'r','m','a','n'};//initialization of characters
 
        printf("%s",name);//printing the value
   
   

    getch();
}










-------------------------------
in codeblocks:-
-------------------------------
#include <stdio.h>

int main()
{
    char name[10]={'r','m','a','n'};
    int i;
    for(i=0;name[i]!='\0';i++)
    {
        printf("%c",name[i]);
    }
   

    return 0;
}


WAP to print a string.

code is
------------------------------------------------

>>> name="Nepal"
>>> print name
Nepal
>>> print("name=%s"%name)
name=Nepal
>>>


-----------------------------
output is
----------------------------------------
Nepal
name=Nepal as print in above code.
--------------------------------
screen shot is
-------------------

wap to print hello world in python

the code is:
------------------------------------------------------------------------------------
print("hello world");

------------------------------
output is:-
--------------
hello world



screenshot is

Python basic programs

Click following to understand the program
------------------------------------------------------------
WAP to understand comment with hello python text in python.

                                                                                                                       
                                                                                                       
                                                                                                                         solution

                                                                                                                         solution





.WAp to print hello world in Python.

                                                                                                                            solution

.WAP to print a string.

                                                                                                                             solution


WAP to find sum of two numbers 3 and 4.

                                                                                                                             solution

Learning Python 3.8

click the program to learn python commands/programs.
--------------------------------------------------------------------------

1. Python basic programs:- It contains Python basic programs. Like input,output,variables.


2. Python controls structures:-
                       It contains programs related to if,if,if else,switch,nested if, loop,nested loop etc.

Python list programs: 
                                  It contains programs using concept of list. Here list means a collection of data which is ordered and changeable. It allows duplicate( same data entry or storage) members.

Python tuple programs:-
             Here tuple means ordered and unchangeable data. It also allows duplicate/same data storage.

Python set program:
                         It contains programs in which are data are unordered and unindexed. It does not permit duplicate data.

Python Dictionary programs:-
                              It conatins programs using concept dictionary where data are un ordered,indexed and changeable.It does not permit duplicate members.

Python Lambda programs:-


Python array programs:
                                  It contains programs related to array.

4.Python functions:
                                 It contains programs related to functions and their uses.



Python with OOP concept:

      Python with class and object programs:


     Python with inheritance:-

    Python with iterators:-

    Python with scopes:


   Python with scopes:


   Python with modules:-


   Python with dates:

  Python with JSON:-

 Python with Regex:-


 Python with PIP:-


 Python with try..except:-