Software Development Exam  >  Software Development Notes  >  Basics of Python  >  Flowchart: Assignment Solutions

Flowchart: Assignment Solutions | Basics of Python - Software Development PDF Download

Example 1: Find the Sum of Two Numbers Entered

  • Step 1: Read the Integer A.
  • Step 2: Read Integer B.
  • Step 3: Perform the addition by using the formula: C= A + B.
  • Step 4: Print the Integer C.

Find the Sum of Two Numbers Entered
Flowchart: Assignment Solutions | Basics of Python - Software Development

Example 2: Determining the Largest Number Among All the Entered Integers

  • Step 1: Read the Integer A.
  • Step 2: Read Integer B.
  • Step 3: If B is greater than A, then print B, else A.

Determining the Largest Number Among All the Entered Integers
Flowchart: Assignment Solutions | Basics of Python - Software Development

Example 3: Work Out All the Roots of a Quadratic Equation ax+ bx + c = 0

  • Step 1: Enter the variables a, b, c, D, x1, x2, rp, and ip.
  • Step 2: Evaluate the discriminant by using the formula: D= b2- 4ac
  • Step 3: Print rp and ip.

Work Out All the Roots of a Quadratic Equation ax2 + bx + c = 0
Flowchart: Assignment Solutions | Basics of Python - Software Development

Example 4: Find the Fibonacci series till term ≤ 1000

  • Step 1: Declare the variables i, a, b, show.
  • Step 2: Enter the values for the variables, a=0, b=1, show=0
  • Step 3: Enter the terms of the Fibonacci series to be printed, i.e=, 1000.
  • Step 4: Print the first two terms of the series.
  • Step 5: Loop the following steps:
    • Show = a + b
    • a= b
    • b = show
    • Add 1 to the value of i each time.
    • Print Show

Find the Fibonacci series till term ≤ 1000
Flowchart: Assignment Solutions | Basics of Python - Software Development

Example 5: Calculate the Sum of The First 50 Numbers

  • Step 1: Declare number N= 0 and sum= 0
  • Step 2: Determine N by N= N+1
  • Step 3: Calculate the sum by the formula: Sum= N + Sum.
  • Step 4: Add a loop between steps 2 and 3 until N= 50.
  • Step 5: Print Sum.

Calculate the Sum of The First 50 Numbers
Flowchart: Assignment Solutions | Basics of Python - Software Development

Example 6: Find the largest price among 100 given values and reduce it by 10%

  • Step 1: Read the 100 prices.
  • Step 2: Compare the first price with the next and let the greater of the two be 'max' in the 'max index.
  • Step 3: Loop it until the largest price has been found.
  • Step 4: Reduce the 'max' value by 10% using the formula: prices [max index] = prices [max index] x 0.9.
  • Step 5: Print.

Find the largest price among 100 given values and reduce it by 10%
Flowchart: Assignment Solutions | Basics of Python - Software Development

Example 7: Arrange the numbers X, Y, Z in descending order

  • Step 1: Input the value for variables X, Y, Z.
  • Step 2: Read the integers X, Y, Z.
  • Step 3: Check if x>y, x>z, y>z
  • Step 4: Print the possible order.

Arrange the numbers X, Y, Z in descending order

Flowchart: Assignment Solutions | Basics of Python - Software Development

Example 8: Determine the Highest Common Factor (HCF) of two integers

  • Step 1: Read the variables a and b.
  • Step 2: If a = b, go to step 4.
  • Step 3: If a > b, then: a = a - b. Return to step 2.
  • Step 4: Print a or b.

Determine the Highest Common Factor (HCF) of two integers

Flowchart: Assignment Solutions | Basics of Python - Software Development

Example 9: Determine and Output Whether Number N is Even or Odd

  • Step 1: Read number N.
  • Step 2: Set remainder as N modulo 2.
  • Step 3: If the remainder is equal to 0, then number N is even, else number N is odd.
  • Step 4: Print output.

Flowchart: Assignment Solutions | Basics of Python - Software Development

Example 10: Calculate the Interest of a Bank Deposit

  • Step 1: Read amount.
  • Step 2: Read years.
  • Step 3: Read rate.
  • Step 4: Calculate the interest with the formula "Interest=Amount*Years*Rate/100.
  • Step 5: Print interest.

Flowchart: Assignment Solutions | Basics of Python - Software Development

Example 11: Determine Whether a Temperature is Below or Above the Freezing Point

  • Step 1: Input temperature.
  • Step 2: If it is less than 32, then print "below freezing point", otherwise print "above freezing point".

Flowchart: Assignment Solutions | Basics of Python - Software Development

Example 12: Determine Whether A Student Passed the Exam or Not

  • Step 1: Input grades of 4 courses M1, M2, M3 and M4.
  • Step 2: Calculate the average grade with the formula "Grade=(M1+M2+M3+M4)/4".
  • Step 3: If the average grade is less than 60, print "FAIL", else print "PASS".

Flowchart: Assignment Solutions | Basics of Python - Software Development

The document Flowchart: Assignment Solutions | Basics of Python - Software Development is a part of the Software Development Course Basics of Python.
All you need of Software Development at this link: Software Development
49 videos|38 docs|18 tests

Top Courses for Software Development

49 videos|38 docs|18 tests
Download as PDF
Explore Courses for Software Development exam

Top Courses for Software Development

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Viva Questions

,

Extra Questions

,

Flowchart: Assignment Solutions | Basics of Python - Software Development

,

Exam

,

ppt

,

mock tests for examination

,

Sample Paper

,

MCQs

,

Summary

,

video lectures

,

study material

,

Flowchart: Assignment Solutions | Basics of Python - Software Development

,

past year papers

,

shortcuts and tricks

,

Semester Notes

,

Free

,

Objective type Questions

,

pdf

,

Flowchart: Assignment Solutions | Basics of Python - Software Development

,

Important questions

,

Previous Year Questions with Solutions

,

practice quizzes

;