0% found this document useful (0 votes)
4 views4 pages

Flowcharts for Python Assignments

The flowchart shows a process to obtain the sum of the first 30 natural numbers. It initializes a variable N to 0, initializes the total to 0, then adds N to the total in a loop while incrementing N by 1 each time until N equals 30, at which point it prints the total.

Uploaded by

Deep
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views4 pages

Flowcharts for Python Assignments

The flowchart shows a process to obtain the sum of the first 30 natural numbers. It initializes a variable N to 0, initializes the total to 0, then adds N to the total in a loop while incrementing N by 1 each time until N equals 30, at which point it prints the total.

Uploaded by

Deep
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Institute of Management, Nirma University

Integrated BBA-MBA Programme (Batch: 2019-24)

Python

Individual Assignmnet

Submitted to

Prof. Omkar Sahu

Submitted on

18/09/2022

Submitted By

Deep Nenwani (197311)


Q1. Draw a flowchart to show how to obtain the sum of the first 30 natural numbers.
[Hint: loops are useful when we have to perform some repetitive tasks over a finite
amount of time]

START

Input n and an
array G of size n

NO
Initialize i = 0
min = i
min = 0

Yes
G[i] <
i>n G[min]
Yes

NO

PrintG (min)

END
Q2. An array contains n number of integers. Draw a flow chart to identify
the minimum number stored inside the array.
(P.s. Solution on the next page)
START

Initialize N = 0

TOTAL = 0

N = N+1

TOTAL = TOTAL+N

NO

IS N = 30?

YES

PRINT
TOTAL

END

You might also like