Class VIII- Coding Notes (Python)
Practice for the following –
Draw Flowcharts – (include variable and message statement) and write the python
programs also.
1) Process based simple flowcharts –
a. calculate area of a square and some similar to it like parameter of
rectangle
2) Printing based simple flowcharts-
a. Print name, age, and birth year.
b.
3) Decision based flowcharts -
* To find sum of two even nos.
* To find the eligibility to Vote
* To find Greatest value among two values
* To print the highest SP or CP and calculate Loss and profit.
* To print your name 10 times
* Print Table of any digit
Some python programs are given below for practice.
Fig.1.1
To find the given number
is even or odd
F-g. 1.2 To find the
greatest number
Programs on Users Choice
INPUT Statement- e.g.
• Integer - a = int(input("Please enter your age: "))
• Float - b= float(input("Please enter your marks: "))
• String – c= str(input("Please enter your name: "))
Practice Exercise –
1. Make a Program on user input based-
a. Find the Selling Price, If cost price is already defined, also mention the loss and
profit with statements.
b. Print the message whether the students is promoted or demoted in the current
session after the annual exam.
c. Find the area and circumference of a circle and radius will taken from the user.
d. To check a number is positive or negative
e. To find the year is leap year or not.
2. Write the output of the following code- Correct the Program and rewrite-
***************