Posts

Showing posts from December, 2020

Slice in String of Python

Image
 Slice: A slice is used to pick out a part of String. This is a easy way to pick out a needed number of string from a file or a documents. Slice makes easy to search of String in rapid form. Here we see a small example of Slice ..  String s= "abcdefghij". The index and terms of following String is below : fig: Index and term of String                                                                                                                 Now the method of Slicing String is Given Below in Figure: As in figure you Slice any String by given it's particular index. The basic structure of Slice is :    String_name [starting location : Ending location+1]

Strings in Python

 STRINGS.   String is a data-type in python. String is created by enclosing text in   quotes. You can use either Single quotes (' ') or Double quotes (" "). Examples:  name="Hello " address="This is a string" sttring='This is single quotes string' * Input a String:   string_var_name=input("Enter a string") * Length of String: To find a length of string we use (Len) Function. For Example :   print(len("Hello"))   >> Output >> 5 >> Some useful String Functions: strcat   (String Concatenation) strcpy  (String copy) srtcom (String Comparison) strlen   (String Length) strrev   (String Reverse) In next page we briefly learn about string functions..

IF Statements In Python

 IF STATEMENTS. If Statements is used to control the flow of   program. We are able to solve complex types of program using If Statements. If Statements help to find certain Condition. If statement give output TRUE if and if only the condition is satisfy. Simple Example of IF Statements :     from random import randint    num=randint(1,10)    guess_num=eval(input("Enter your guess "))    if guess_num == num:         print("You got right number")    print("The right number is:", num) >> Output >> Enter your guess >> 6                   >> You got right number                    >> The right number is: 6. String in python 👇👇👇                   String Python

Range Function In Python

 Range Function. The value we put in range Function determines how many times we will Loop. The  range Function is used with the Loops statements. Some range function statements and their value are :: Statements:                      Values generate: range(10)                          0,1,2,......,8,9 range(1,10)                       1,2,.....,7,8,9 range(3,7)                         3,4,5,6 range(2,15,3)                    2,5,8,11,14 range(9,2,-1)                     9,8,7,6,5,4,3 Program of range function :     for i in range(5,0,-1):           print(i, End=" ")    print("Range functio...

Analytical Geometry Conic Section

Image
 Conic Section. Curve obtained by intersection of cone and plane is called Conic section. Let O be the fixed point and OM be the fixed line. The point O is called Vertex, OM is called the axis, OA is called generator and (angle AOM ) is called semi-vertical angle. If the cone symmetric to the cone OAB is added whose axis is opposite to OM, then it is double right cone.                                                                   

For Loops in Python

 FOR LOOPs. To perform some task repeatedly we used Loops statement. For Loops is one type of Loop in Python. For Loop is used to iterate over a given sequence, such as Lists, Dictionary or Strings.   The code below prints "Hello Friends" for 10 times.   for i in range(10):         print("Hello Friends") In Python instead of using braces ({}), We use indentation to point the Loop Statements. We look another example of For Loops. for i in range(1,4):            print("*" *i)  >>> Output >> *                           **                           *** Range function 👇👇👇 Range Function....

About DNA

 DNA:   DNA is Deoxy Ribonucleic Acid . It is the Molecule located inside the Nucleus of a cell. The main Job of DNA is to store and codes Genetic Information of body. DNA codes genetic information for transmission of inherited traits. In most life cycle of cell DNA located inside nucleus of cell like coiled noodle. But when cell replicates, the DNA is arranged in form of structure known as Chromosome.      DNA determine that the structure of DNA is a double-helix polymer where   two DNA strands wound around each other                                        Each strand of a DNA molecule  is composed of a long chain of monomer nucleotides . The nucleotides of DNA consist of a deoxyribose  sugar molecule to which is attached a phosphate  group and one of four nitrogenous bases:               ...

Python variable

 Variable.   Variable is same like as container to store somethings. So In Python variable is a memory space to store data or values for use in program. The major purpose of a variable is to remember a value from one part of the program . So it can be  used in another part of program.     Now we look a example of using variable in different places in     program..               temp=eval(input("Enter a temperature in celsius"))    faren_temp=9/5*temp+32    print("The temperature in Fahrenheit is ", faren_temp)    if faren_temp>212:              print("That temperature is above of Boiling point")    if faren_temp<32:              print("That temperature is below Freezing point")    >> Output >>  >> Enter a temperature in celsius >> 90  >> 194  >...

Getting Input In Python.

 Getting input.   The input Function is simple way for your program to get input from Users.. We can take any type of input from users. To take input first we need to declare its Data types. It is simple to declare data-types in Python. Let's see a simple example.   1. Example to take name of user and print it.     name=eval(input("Enter your name"))     print("Hello", name) >> output >> >> Enter your name >> Google  >> Hello Google    2. Example to find square of given number.         num=int(input("Enter number to find square"))        print("The square of", num, "is", num*num) >> output >> >> Enter number to find square >> 7 >> 49   In above program the key point is that, If we want integer value then we write (int) to get input and (eval) to get String input. We also write (input) only. One of the nice feature to use (eval)  ...

QBASIC Program to find Cube and Square.

  Input any number and display it's cube. -----------------------------------------------------   CLS    INPUT "Enter the value for a"; a    LET c=a*a*a    PRINT "Cube="; c    END    >> Output>> "Enter the value for a >> 5    >> Output>> 125   Input any number and display it's Square. --------------------------------------------------------        CLS     INPUT "Enter any value to b"; b     LET d=b*b     PRINT "Square="; d     END   >> Output>> Enter any value to b >> 5   >> Output >> 25

QBASIC Programs

  Write a QBASIC program to print Hello World: Open QB64 latest version  and Write following code. Save the program by using (.BAS ) extension.   CLS    PRINT "HELLO WORLD"   END   >> output >> HELLO WORLD Another way to print this program is by using variable.   CLS   STRI$="Hello friends how are you."   PRINT STRI$   END >> output >> Hello friends how are you.

BASIC Language

  QBASIC  BASIC (Beginners All Purpose Symbolic Instruction Code) is a high level programming language developed by professor John G. Kemeny  and Thomas E. Kurtz in 1964. There are many basic language. QBASIC is one of the popular Basic language developed by Microsoft corporation in 1985. Some other basic are GWBQSIC, QUICK BASIC, TURBO BASIC and VISUAL BASIC. QBASIC uses English keyword and mathematical symbols to write programs. QBASIC has its own editor where we write, modify, run and debug program. We can also write a simple small program to complex program in QBASIC. The conversion of the statements of a program is done by its own interpreter. The interpreter of QBASIC converts one statement of a program into machine code at a time so it is also known as an interpreter.

PYTHON

  About Python Python is a popular, powerful, object-oriented, interpreted, high-level, community support , scripting language. Python was created by Guido Van Rossum and release in 1991. The name of Python is actually not a snake, this name originate from the Python's Flying Circus. Nowadays Python is Highly used language among others. Some of the Fields are :  Web Development (Server-side)  Software Development  Mathematics  Data science  Machine learning System scripting  and many more. ---------------------------------------------------------------------------------- Why python is highly used ?    The popularity of python is increased day-to-day. Some of it's reason are:: Easy to learn. Open source IDE. Python work on different platform(Window, Linux, mac) Python is more productive. Large community.     Now we write our first Python   program..            print("Hello world")  ...

World Wide Web

Image
 WWW Now a days we all familiar with the internet and used Websites or Web browsers. So it is important to know that the History of WWW. WWW stand's for World Wide Web. It is an information system where documents and other web resources (Documentations of product, Web pages , Company websites) by uniform resources locator(URL) .   Fig: WWW.         History of WWW . ------------------------------- The development of World Wide Web was begun in 1989 by Tim Berners-lee and his Collegues friends. They created a protocol, Hypertext Transfer protocol (HTTP) which standardized communication between server and clients. To the Christmas of 1990 Berners-lee had built all that tools which are necessary for Web working. Tools like: Hypertext Transfer protocol (HTTP), Hypertext Markup Language(HTML), Web browser, Web servers and first Web page.                 

Data Types in C

 Data Types in C Programming language..  Mainly we use  3 types of data types  in C Language Integers data type Floating point data type Character data type Integer data types : The positive and negative value from the range of (-32,768 to 32,767) is include by the Integer data type. Example: int = 23;  Floating point data types: The data types which hold decimal numbers is Floating point data. Example: float = 23.54; Character data type: Single word or single character is used inside character data type. For working with large character or sentences we use String function. The range of character data type is from -128 to 127. Above range is based of ASCII which is corresponding to char, special symbol values. Always use Quotes mark to use character. Example: char = "a"; Let's see one example based on data types:: #include<stdio.h> #include<conio.h> void main() { int a,b; float c; char s; printf("Enter some character"); scanf("%s",&s);...

C programming language

About C programming Language? C is a High Level Programming language written by Dennnis Ritchie in around 1970's . C is a most popular programming language among many computer languages. C language is widely used language in world. Most of the Operating system build under the C language. Linux operating system , MySQL the most popular database software, Symbian are developed using C language. Most Desktop operating system as well as Mobile operating system developed by C programming language. The basic syntax of C programming language : #include<stdio.h> void main() { pritnf("Hello world"); } // Congratulations to all you write your first program in C language.

Programming Language

  What is programming language ? First we want to know about the program. Program is a set of      instruction given to computer to perform some specific tasks. So we said that programming language is a sets of instruction  to make computer hardware and software performable/workable. Programming language is a backbone of any Software or Applications. There are Two types of programming language ::  1.Low Level Languge  2.High level language    1.Low Level language: Low Level language are those type of language which are fast and memory  efficient  language.  Low level language sit close to the computer's insruction set. It's instruction or commands are little difficult to memorize. Some types of low level language are : ASSEMBLY,MACHINE ... 2. High Level language: High level language are user friendly, easy to learn programming language. By using this types of language the programming productivity is better. The commands are ea...