About Me

My photo
Vijayapur, Karnataka, India
I am interested in Teaching.

Monday 16 March 2020

Assignment-1 on Python (For VI Semester Mechanical Engineering Students)

What is is Python? List and explain its features in brief. (Explain all or any ten) (10 marks)
Hints:
(4 LED OF I(ndian)  HP G(as) 2M(aintenance)

"Python is a high level, interpreted and object oriented programming language."


Features:

Easy
Expressive
Free and Opensource
High level language
Portable
Object Oriented
Extensible
Embedded
Interpreted
Large standard library
GUI Programming
Dynamically Typed
Multi Threaded
Garbage collection
Maintenance is easier

List and explain in brief about the applications of Python.
Hint: DR 3SSSW ABCD  ENG DP
Applications:
Web development
Desktop GUI applications
Scientific and Numeric Applications
Software Development
Education
Business Applications
Database Access Applications
Network Programming
Games and 3D Graphics Applications
Artificial Intelligence and Machine Learning Applications
Prototyping
3D CAD application
Computer Vision applications
Robotics
Data Analysis, etc.

Discuss with examples about to two working modes with Python.
Interactive mode and Script mode


What is variable? List the rules to declare a variable in Python. Demonstrate with examples.

Explain the rules of precedence of operators in Python with examples.

What is debugging ? Discuss types of errors.
bug means error in computer program.
The process of removing errors from written program is called debugging.
Explain following three types of errors.
syntax error
runtime error
semantic error

What is functions in Python? Discuss function definition and function call with examples.

Write a Python program to find volume of a sphere.
Hint: (volume=(4/3)*(3.142)*radius*radius*radius

Write a python program to find addition, subtraction, multiplication and division of two integers.

Write a python program to find largest of two integers.

Write a python program to check for leap year or not leap year.

Write a python program to convert temperature reading from Fahrenheit to Celsius.

Write a function to find square and cube of a number in python.

Write a function to print following grid on display.
+ - - - - + - - - - +
 |  - - - - | - - - - |

 |  - - - - | - - - - |
 |  - - - - | - - - - |
+ - - - - + - - - - +
 |  - - - - | - - - - |
 |  - - - - | - - - - |
 |  - - - - | - - - - |
+ - - - - + - - - - +







No comments:

GCD of two numbers and its application...

The greatest common divisor (gcd) of two numbers is the largest positive integer that divides both numbers without leaving a remainder. The ...