100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Summary asdasdasd $8.49   Add to cart

Summary

Summary asdasdasd

 4 views  0 purchase
  • Course
  • Institution

Summary of 6 pages for the course _Database Systems- Design, Implementation, _ Management, 12e Coronel SM at _Database Systems- Design, Implementation, _ Management, 12e Coronel SM (from)

Preview 2 out of 6  pages

  • February 25, 2023
  • 6
  • 2022/2023
  • Summary
avatar-seller
We will learn about flow charts, pseudocode and programming languages. We will
also learn about programming languages and why do we use them. After this, we
will write our program. This will be our flow whenever we will solve any problem.
First question, then given values, then approach and at last we will code it. Bhaiya
explains what is a flowchart is a diagramatic approach of that approach known as
flow chart. The flow chart constitute various components, connected with each
other Bhaiyan says. He says that from where a program is starting we have a
component called terminator. Terminator is used to show the start and end start
of the program. Next block is a simple rectangle, which shows a process. Bhaiya
explains how to make a flowchart for the sum of 2 numbers. He says the
pseudocode as a whole is a generic way of representing logic. The flow of a flow
chart is the same as the flow of the components of the flow chart. We use
parallelogram to show the input/output of the program.

We want to make a flowchart for calculating simple interest This is the formula for
simple interest You must have studied it in your school We started our program
from this start block I do n't know p , r , t , so I need to take them as inputs first
So I asked user to give me the values for p, r and t So now I have P , R and T So I
made this rectangular block for the calculation part Here I wrote this formula After
finding this answer in the above calculation , I have to print the output too So
here I will print output with this block print SI and then we will end this program
We started the program , took a , b as input then we checked whether a is less
than b or not. If a < b print `` YES '' else print `` NO '' and its done Simple You
just have to write in english what you are thinking and it is called pseudocode. If
any number has 2 as its factor , then it is even number or ODD number. We have
to check a condition that whether N is ODD or EVEN , so we will make one block
for this condition Here is the decision making block , Is N % 2 = 0 ? We will get 2
outputs , YES or NO If output is YES, then it is an EVEN number , so I printed ODD
Else, I will print ODD Then I made this end block and ended this program
something like this This is the flowchart for EVEN , ODD Got it right ? Bhaiya, why
are you putting this inverting commas again and again , you will come to know
soon.

We have to print something and then increment too You have to Print and then
increase the printed number too You can see here , we printed and then increased
the numbe by 1 But we do n't know how to do it How we will increase again and
again Let 's rub it You know that we have to start from 1 and print till 5 So if I give
you a number which starts from 1 to 5, will it work ? Your are like , yes , this is
what we needed So I took a number =1 This is not a input , it is a process , so I
wrote it inside rectangular block. You have to print all the odd numbers from 1 to
N as a part of your homework. The catch is , 1 and N are inclusive here in the
answer should be 15. The solution is easy , you just have to use less than equal to
instead of less than. We know that we have to start with num=1 and increment it
till N I know N = 5 , Num =1 , and sum =0 in the beginning. Then I added number
in the sum and incremented the number by 1 and then again did the same thing
over and over again In the beginning , number is 1 , sum is 0 , then sum is 1 and
number is 2 and we kep on doing so , till number < =5 Now let 's try to solve it.
You will get your homework after this. Prime numbers are those numbers which
have only 2 factors , 1 and that number itself.

Flowchart shows how to add conditions, loops, input/output, processing,
processing and start/end. We also learnt how to write pseudocode and how to talk
about programming languages We will answer only 2 questions - What is it ? and
why we use it? You will get your homework questions too. We learnt about

, flowcharts in this lecture, pseudocode and took an overview of programming
languages. Next lecture will be out tomorrow - most probably where we will be
writing our first C++ program - Namaste Duniya ( Hello world ) As a homework,
you have to write pseudocodes for all the questions we have solved today.

Lecture 2: Write Your First Program in C++
This is the 2nd lecture of our DSA series. We will see how a program runs and
what does each line mean in this lecture. This is how the compilation process work
So it is compiler which makes it possible for us to run a source code. Coding
Ninjas has supported us in providing this amazing DSA course to you. Courses are
available in both Hindi and English. you need an IDE to write, run and execute a
code. There are many IDEs out there - CodeBlocks, VsCode and many more -
which you do n't even need to install Replit is one of them. You can directly create
a C++ there and run it using Replit. In C++, many namespaces are there which
have cout functions in them so if we want to use cout , we have to add this file to
our code. We use these signs to output the result into standard namespace. If you
will use > > by mistake by mistake, then it will give you compilation error So we
use this operator to display output.

We are going to talk about data types and variables. Whenever you have to story
any information or data in the memory. You have to mention what type of data it
is and how much memory it will take. For eg- int a = 5, a is a variable in memory
which is of int type and it has value 5 in it. We have certain rules which we have
to follow when we are giving names. There is a function named sizeof , which will
tell you about the space being used by any variable. In memory, first 29 bits will
have 0, and last 3 bits will be 101, so in memory the first 29 bit will have 0 and
the last 3bits will have 101. We have a way to story multiple characters but we
will see that in upcoming lectures. In c++, all the characters are mapped to some
ASCII value in memory. We will just store binary form of ASCII value of any
character. If we have 4 different bytes with some binary value, how will compiler
know whether it is a single Int value of 4 separate char values ? Compiler will
come to know from data types which we used when we declared any variable. This
process of converting one data type into another is known as type casting.

There are few steps which I have to follow while storing a negative number. Let 's
say the number is -5 1st - Ignore the negative sign 2nd - Convert into binary
representation = 101 3rd - Take 2 's complement and store it Now we can store
negative numbers simply too, by just using their first bit as their sign. With this
our maximum value will be limited to 2^31 -1 instead of 2^32 -1. 2/5 will give 0
and not 0. 4 , why ? because you are storing your answer in a int variable. To get
answer in float, store it in a float variable. If you want to check whether A is equal
to B or not I can do that using this ( a==b ) relational operators = , > , < , ! = is
an assignment operator, because we are assigning 3 to a. logical operators have
& & and & is used to check multiple conditions. We have got the basic idea of
operators. We know what things to keep in mind while dividing , how to store
negative numbers & & operators and ! operators. Now let 's move ahead towards
bitwise operators I will teach these when we will use them in upcoming sessions.
We will do Bitwise operators later.

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller rachayyavastrad. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $8.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

83750 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$8.49
  • (0)
  Add to cart