0% found this document useful (0 votes)
14 views21 pages

Class 10 Python Programs1

The document outlines a curriculum for a Class X Artificial Intelligence course focusing on Python programming for the session 2023-2024. It includes various programming tasks such as printing names, calculating areas, and using conditional statements. The course consists of theoretical and practical components, totaling 100 marks.

Uploaded by

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

Class 10 Python Programs1

The document outlines a curriculum for a Class X Artificial Intelligence course focusing on Python programming for the session 2023-2024. It includes various programming tasks such as printing names, calculating areas, and using conditional statements. The course consists of theoretical and practical components, totaling 100 marks.

Uploaded by

sanskritisaini09
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

ARTIFICIAL INTELLIGENCE

(SUBJECT CODE 417)

CLASS – X (SESSION 2023-2024)

Total Marks: 100 (Theory-50 + Practical-50)

4/10/2024 JYOTSNA VERMA 1


UNIT 3 – ADVANCE PYTHON

4/10/2024 JYOTSNA VERMA 2


PYTHON –

BASIC PROGRAMS USING OPERATORS

4/10/2024 JYOTSNA VERMA 3


Write a program (WAP):

a) WAP to print your name.

b) WAP to print your name using a variable.

c) WAP to ask the user for their name and print it on the
screen.

4/10/2024 JYOTSNA VERMA 4


Write a python program to calculate the area and
perimeter of a rectangle

4/10/2024 JYOTSNA VERMA 5


Write a python program to accept marks of any five
subjects and find the total and percentage

4/10/2024 JYOTSNA VERMA 6


WAP to swap two numbers :
a)Using third variable
b)Without using third variable

4/10/2024 JYOTSNA VERMA 7


>>> x=20
>>> y=10
>>> x,y=y,x
>>> x
10
>>> y
20
>>>

4/10/2024 JYOTSNA VERMA 8


PYTHON –

BASIC PROGRAMS USING IF STATEMENT

4/10/2024 JYOTSNA VERMA 9


4/10/2024 JYOTSNA VERMA 10
• Write a program to tell whether a person is eligible to drive or not.

• WAP to print the result of a student. The student is considered as passed if he

has scored more than 75 marks.

• WAP to check if a number is positive or negative

• Input a number from the user. Ask if they want to find the square of the number or

double it. Depending on the choice, perform the proper operations and print the

final result.

• Ask the user to enter the length and breadth. Check whether it is a square or a

rectangle.

4/10/2024 JYOTSNA VERMA 11


4/10/2024 JYOTSNA VERMA 12
4/10/2024 JYOTSNA VERMA 13
4/10/2024 JYOTSNA VERMA 14
WAP to check if a number is prime or not

4/10/2024 JYOTSNA VERMA 15


PYTHON –

NESTED IF STATEMENT

4/10/2024 JYOTSNA VERMA 16


• Write a program to calculate the smallest of three numbers using

IF-ELSE

4/10/2024 JYOTSNA VERMA 17


There are 4 subjects a student can choose from. Input the student name and
roll number and ask them their subject choice from maths, computer, English
and hindi. Print their details along with chosen subject.

4/10/2024 JYOTSNA VERMA 18


• WAP to input basic salary of an employee and calculate its Gross
salary according to following
Basic Salary <= 10000 : HRA = 20%, DA = 80%
Basic Salary <= 20000 : HRA = 25%, DA = 90%
Basic Salary > 20000 : HRA = 30%, DA = 95%

4/10/2024 JYOTSNA VERMA 19


WAP to check whether a given number is one digit, two digit or three digits using nested if.

4/10/2024 JYOTSNA VERMA 20


PRACTISE QUESTIONS

WAP to calculate income tax as per the given condition:


Yearly income Tax rate
Upto Rs 2,50,000 Nil
Rs 2,50,001 to 3,00,000 5% of Yearly income
Rs 3,00,001 to 5,00,000 10% of Yearly income
Rs 5,00,001 to 10,00,000 20% of Yearly income
Above 10,00,000 30% of Yearly income

4/10/2024 JYOTSNA VERMA 21

You might also like