Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Task 1

The Program takes takes student's name as input and the marks obtained using store_data() and takes input of the student's name to retrieve the marks using retrieve_data()

Execution command:

python "Task 1.py"

Output (CASE 1):

Enter the student's name: Vivek
Vivek's marks: 40
Enter the student's name: Vivek
Marks obtained: 40

Output (CASE 2):

Enter the student's name: Vivek
Vivek's marks: 20
Enter the student's name: Himanshu
Student not found.

Task 2

The Program uses List slicing to fetch the print the first 5 elements from a list of 10 numbers and prints the reverse of the obtained 5 elements

Execution command:

python "Task 2.py"

Output:

Original list: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Extracted first five elements: [1, 2, 3, 4, 5]
Reversed extracted elements: [5, 4, 3, 2, 1]