0% found this document useful (0 votes)
25 views15 pages

Output

The document describes a Python program that takes various data types as input from the user, including integers, floats, strings, lists, tuples, and dictionaries, and prints their class types. It then performs arithmetic operations on numbers, string concatenation and substring extraction, list operations like append and remove, and accessing elements of a tuple. It also calculates the largest number in a list, factorial of a number, Fibonacci sequence, stores and prints student details, copies content between files, finds unique words in a file, and performs bitwise operations.

Uploaded by

saravanan220304
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)
25 views15 pages

Output

The document describes a Python program that takes various data types as input from the user, including integers, floats, strings, lists, tuples, and dictionaries, and prints their class types. It then performs arithmetic operations on numbers, string concatenation and substring extraction, list operations like append and remove, and accessing elements of a tuple. It also calculates the largest number in a list, factorial of a number, Fibonacci sequence, stores and prints student details, copies content between files, finds unique words in a file, and performs bitwise operations.

Uploaded by

saravanan220304
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/ 15

Output:

Enter a integer value:10

<class 'int'>

Enter a float value:2.4

<class 'float'>

Enter a complex value:1j

<class 'complex'>

Enter a string value: vignesh

<class 'str'>

Enter no.of values for list:3

Enter a value for list:3

Enter a value for list:5

Enter a value for list:8

['3', '5', '8']

<class 'list'>

('one', 'two', 'three')

<class 'tuple'>

Enter no.of values for dictionary:3

Enter a key for dictionary:1

Enter a value for key:one

Enter a key for dictionary:2

Enter a value for key:two

Enter a key for dictionary:3

Enter a value for key:three

{'1': 'one', '2': 'two', '3': 'three'}

<class 'dict'>

Enter a boolean value True or False:True

True

<class 'bool'>
Output:
Enter First number: 10

Enter Second number 2

Addition: 12

Subtraction: 8

Multiplication: 20

Division: 5.0

Floor Division: 5

Power: 100

modulos: 0
Output:
Enter first string:Vignesh

Enter second string:Saveetha

Concatenated string: VigneshSaveetha

Substring: Saveetha
Output:
0. Exit

1. Add

2. Delete

3. Display

Enter choice: 1

Enter number to append: 2

List:[ 2]

Enter choice: 1

Enter number to append: 4

List: [2, 4]

Enter choice: 2

Enter number to remove: 2

List: [4]

Enter choice:0

Exiting!
Output:
Created tuple is : ('apple', 'banana', 'cherry', 'mango', 'grape', 'orange')

Second fruit is : banana

From 3-6 fruits are : ('mango', 'grape', 'orange')

List of all items in Tuple :

apple

banana

cherry

mango

grape

orange

Yes, 'apple' is in the fruits tuple

Length of Tuple is : 6
Output:
Alice's score: 92

Bob's updated score: 80

Student Scores:

John: 85

Alice: 92

Bob: 80

Emma: 95

Charlie: 88

Emma's score is recorded.

Updated Student Scores:

Alice: 92

Bob: 80

Emma: 95

Charlie: 88
Output:
Enter the number of elements: 5

Enter element 1: 34

Enter element 2: 65

Enter element 3: 76

Enter element 4: 56

Enter element 5: 25

The largest number is: 76.0


Output:
Enter a number:7

The factorial of 7 is 5040


Output:
How Many Terms: 10

Fibonacci sequence:

13

21

34

None
Output:
Enter a Student Name:Vignesh

Enter a Register No:21UCA233924

Enter a Department:Computer Application

Enter mark of subject 1:93

Enter mark of subject 2:97

Enter mark of subject 3:99

Enter mark of subject 4:95

Enter mark of subject 5:98

Name: Vignesh

Register No: 21UCA233924

Department: Computer Application

Total Mark: 482

Average: 96.4

Percentage: 96.39999999999999
Output:
Enter the name of the input file: F:\first.txt

Enter the name of the output file: F:\second.txt

Content from F:\first.txt has been copied to F:\second.txt.

First File Second File


Output:
Enter file name: F:\test.txt

The unique words in alphabetical order are:

am

from

gandhiraja

hello

hi

salem

vignesh
Output:
Enter a Number:100

C
Output:
Enter a number 1:24

Enter a number 2:4

331776
Output:
Enter a String:I am Vignesh from salem
salem from Vignesh am I

You might also like