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

Aditya Python

Uploaded by

Sourav Pathania
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)
18 views

Aditya Python

Uploaded by

Sourav Pathania
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/ 10

Fundamentals of Computer Technology and Programming

Practical File for Semester One

Name: Aditya Sharma Class:.


ECE sem-1

Roll No: 17042208122

Problem 1: To test whether a number is Even or Odd

Code:

Output:

Problem 2: To know whether a number is Zero, Positive or Negative

Code:

Output:
Problem 3: To accept a numeric digit from keyboard and display it in words

Code:

Output:

Problem 4: To display even numbers between m and n

Code:
Output:

Problem 5: To display odd numbers from 1 to 10 using range () object

Code:

Output:

Problem 6: To display the stars in an Equilateral Triangle

Code:

Output:
Problem 7: To generate a Fibonacci numbers series

Code:

Output:

Problem 8: To calculate the factorial values of the number using a function

Code:

Output:

Problem 9: To check a given number is prime or not.

Code:
Output:

Problem 10: Write a function that returns the results of addition, subtraction, multiplication and division

Code:

Output:

Problem 11: To calculate the factorial values of the number using recursion

Code:
Output:

Problem 12: To create a lambda function that returns a square value of the given function

Code:

Output:

Problem 13: To create a python module for finding a factorial of a given number

Code:

After Saving this file you can call the function fact from another file after importing test.py

Output:
Problem 14: To display the elements of a list in reverse order

Code:

Output:

Problem 15: To access each element of a string in forward and reverse order using For and While loop

Code:

Output:
Problem 16: To sort a group of strings in alphabetical order

Code:
Output:

Problem 17: To read all strings from a text file and display them

Code:

File:

Output:

Problem 18: To append data to an existing file and then displaying the entire file

Code:

File:

Output:

Problem 19: To copy an image file into another file

Code:

Problem 20: To write and read csv files in Python


Code:

File:

Output:

You might also like