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

Experiment - 1.2: Aim of The Practical: Task To Be Done: Flowchart

The document describes an experiment to learn the basics of Python. The task is to remove characters at odd indices from a string. The code defines a function to modify a string and remove characters at odd indices. Some learning outcomes and an evaluation grid are also included.

Uploaded by

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

Experiment - 1.2: Aim of The Practical: Task To Be Done: Flowchart

The document describes an experiment to learn the basics of Python. The task is to remove characters at odd indices from a string. The code defines a function to modify a string and remove characters at odd indices. Some learning outcomes and an evaluation grid are also included.

Uploaded by

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

EXPERIMENT – 1.

2
Student Name: SHREY KANSAL UID: 20BCS3678
Branch: INFORMATION SECURITY Section/Group: 20BIS2-B
Subject Name: PROGRAMMING IN PYTHON LAB Subject Code: 20CSP-286

AIM OF THE PRACTICAL: Learn the Basics of Python.

TASK TO BE DONE: Python Program to Remove the Characters of Odd Index Values in a String.

FLOWCHART:
CODE:

def modify(string):
  final = ""
  for i in range(len(string)):
    if i % 2 == 0:
      final = final + string[i]  
  return final
string = str(input("Enter string:"))
print("New String after character at odd index is removed:", modify(string))

OUTPUT:

LEARNING OUTCOMES:
1. Have learnt basics of python like print(), math modules.
2. Have learnt about list and list methods like append().
3. Have learnt about Conditional statements (Loops) like for loop and while loop.
4. Have learnt why break is used.

EVALUATION GRID:
Sr. No. Parameters Marks Obtained Maximum Marks
1.
2.
3.

BufferedReader bufferedReader=new
BufferedReader(new
InputStreamReader(System.in));
String empId;int c=0;
Employee[] employees=new
Employee[3];
employees[0] =new
Employee("3501","R&D","Engineer","A
sh","1/04/2009",20000,8000,3000,
'e' );
employees[1] =new
Employee("3502","PM","Consultant","A
njali","23/08/2012",30000,12000
,9000,'c');
employees[2] =new
Employee("3503","Acct","Clerk","Raju",
"12/11/2008",10000,8000,1000,
'k');
System.out.println("Enter the
employee ID ");
empId = bufferedReader.readLine();
for(int i=0;i<3;i++)
{
if(employees[i].empId.equals(empId))
{
c=1;
int salary =
salary(employees[i].basic,employees[i].h
ra,da(employees[i].desig
nationCode),employees[i].designationCo
de);
details(employees[i].empId,employees[i].
empName,employees[i].depName,emplo
yee
s[i].empDesignation,salary);
break;
}
}
if(c!=1)
System.out.println("Entered
employee ID not found");

You might also like