Assignment 3 by Swati Katariya
Programming using Phython and C
Given below are few programs practiced in both Python and C language understanding the basic functioning of the language. and what is learnt about the different elements and aspects of programming in these languages.
Python Language
Program to take two integers "a" and "b" as inputs from the user and print their sum.
- Input the values to be adde
- - Defining the 1st value as an "int" integer type "a"
- Display to ask for value
- -----
Output
![](images/A20.png)
Program to take an integer "n" as input and print if it is "odd" or "even".
- Input a value to be check
- n = as an integer (int) to be added in the code
- Checking the value for even and odd using if and else command
- if = enales
Output
![](images/A21.png)
Write a program to take an integer "n" as input from the user and print its factorial
Output
![](images/A22.png)
C Language
Program to take two integers "a" and "b" as inputs from the user and print their sum.
- Input the values to be adde
- - Defining the 1st value as an "int" integer type "a"
- Display to ask for value
- -----
Output
![](images/A30.png)
Program to take an integer "n" as input and print if it is "odd" or "even".
- Input a value to be check
- n = as an integer (int) to be added in the code
- Checking the value for even and odd using if and else command
- if = enales
Output
![](images/A31.png)
Write a program to take an integer "n" as input from the user and print its factorial
Output
![](images/A20.png)