0% found this document useful (0 votes)
3 views

Python Programs (1)

The document outlines various Python programs aimed at performing specific tasks with lists, such as creating, modifying, and printing elements. Each program has a defined aim, followed by a placeholder for the program code, output, and a result indicating successful execution. Programs include tasks like checking voting eligibility, determining grades, and summing numbers.

Uploaded by

Balaji Desikan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Python Programs (1)

The document outlines various Python programs aimed at performing specific tasks with lists, such as creating, modifying, and printing elements. Each program has a defined aim, followed by a placeholder for the program code, output, and a result indicating successful execution. Programs include tasks like checking voting eligibility, determining grades, and summing numbers.

Uploaded by

Balaji Desikan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Program 11

AIM:
To create a list in python of children selected for science quiz with the following names
Arjun, Sonakshi, Vikram, Sandhya, Sonal, Isha, Karthick and perform the following tasks
on the list in sequence:
a) Print the whole list.
b) Delete the name “Vikram” from the list.
c) Add the name “Jaya” at the end.
d) Remove the item which is at the second position.

PROGRAM:

OUTPUT:

RESULT:
The program was executed successfully.
Program 12
AIM:
To create a list num = [23,12,5,9,65,44]
a) Print the length of the list.
b) Print the elements from second to fourth position using positive indexing.
c) Print the elements from position third to fifth using negative indexing.

PROGRAM:

OUTPUT:

RESULT:
The program was executed successfully.
Program 15
AIM:
To create a list of first 10 even numbers, add 1 to each list item and print the final list.

PROGRAM:

OUTPUT:

RESULT:
The program was executed
successfully.
Program 16
AIM:
To create a list List_1=[10,20,30,30]. Add the elements [14,15,12] using extend function.
Now sort the final list in ascending order and print it.
PROGRAM:

OUTPUT:

RESULT:
The program was executed
successfully.
Program 17
AIM:
To create a program to check if a person can vote.

PROGRAM:

OUTPUT:

RESULT:
The program was executed successfully.
Program 18
AIM:
To create a program to check the grade of a student.
PROGRAM:

OUTPUT:

RESULT:
The program was executed successfully.
Program 19
AIM:
To create a program to check if the number is positive, negative or zero and display an
appropriate message.
PROGRAM:

OUTPUT:

RESULT:
The program was executed successfully.
Program 20
AIM:
To print first ten natural numbers.
PROGRAM:

OUTPUT:

RESULT:
The program was executed successfully.
Program 21
AIM:
To print first ten even numbers.
PROGRAM:

OUTPUT:

RESULT:
The program was executed successfully.
Program 22
AIM:
To print odd numbers from 1 to n
PROGRAM:

OUTPUT:

RESULT:
The program was executed successfully.
Program 23
AIM:
To print sum of first 10 natural numbers.
PROGRAM:

OUTPUT:

RESULT:
The program was executed
successfully.
Program 24
AIM:
To create a program to find the sum of all numbers stored in a list.
PROGRAM:

OUTPUT:

RESULT:
The program was executed successfully.

You might also like