AI (417) Assignment For Class X
AI (417) Assignment For Class X
L PANDAVESWAR
ARTIFICIAL INTELLIGENCE (417)
Assignment Questions
Class- X | Final Examination
SESSION: 2024-2025
-----------------------------------------------------------------------------------------------
1. Write a program that will swap the value of two variables.
2. Write a program that will check whether the user entered number is odd or even.
3. Write a program that will accept marks of 5 different subjects from the user and prints the
grade secured by the student using the below given guidelines.
Maximum marks of each subject: 100. Passing Marks: 40
If percentage > 90, grade is A+,
if percentage >80 & <=90, grade is A, if percentage >70 & <=80, grade is A-, if
percentage >60 & <=70, grade is B, if percentage >50 & <=60, grade is C, if percentage
>40 & <=50, grade is Pass, if percentage <=40 grade is Fail.
4. Write a menu driven program to demonstrate the use of python operators using the
guidelines mentioned next. The level 1 menu must allow the user to select the type of
operators. Based on the type of operators selected the next menu must display all the
operators of that type. In the third step accept the required numbers from the user and
demonstrate the operator selected by user.
5. Write a program to print your name 5 times using while and for.
6. Write a program to print each character of your name.
7. Write a program to print the series: 100, 95, 90.......1.
8. Write a program to print first 'n' even numbers. Accept the value of 'n' from user.
9. Print the first 'n' prime numbers.
10. Print the following pattern upto 'n' lines. Accept the value of 'n' from user.
11. Print the following pattern upto 'n' lines. Accept the value of 'n' from user.
1
2 2
3 3 3 3 3
4 4 4 4 4 4 4
12. Write a program to print the sum of digits for a user entered number.
13. Write a program to check if the user entered number is a palindrome or not. (Eg. 16461,
23932 etc.......)
14. Write a program to check the number of vowels in a user entered string. ('A', 'E','','O', 'U'
are vowels. Hence 'SACHIN' contains two vowels.)
15. Create two lists - LST=[1,2,3,4], NAME=['ABC','DEF']. Add the list NAME to LST.
Check the output. Add one more list [5,5] to LST at index value 2.
16. Write a Python program that checks if a given string is a palindrome.
17. Write a Python program to implement a simple login system where users can enter their
username and password. Follow the below guidelines:
User will register with a username and password.
Then they will be asked to Login.
If username and password both matches with registered username and password then
show “Login Successfully!”
In other conditions, show “Invalid Username or Password.”
18. You have given a Python list. Write a program to find value 20 in the list, and if it is
present, replace it with 200. Only update the first occurrence of an item.
For example,