Docsity

Introduction to Programming in Python, Schemes and Mind Maps of Programming Languages

Toggle sidebar
bg1
INTRODUCTION TO PROGRAMMING
Q.1] Write a program in python to find simple interest input principle rate of interest and no of period
from user.
Input:
p=int(input(ā€œenter principleā€));
r=int(input(ā€œenter rateā€));
t=int(input(ā€˜enter time periodā€));
s=p*r*t/100
print(s)
OUTPUT:
Enter principle 10000
Enter rate 5
Enter time period 3
1500.0
Q.2]Write a program in python to find area of circle and perimeter of the circle.
INPUT:
R=int(input(ā€œenter radiusā€));
A=3.14*r*;
P=2*3.14*r
Print(a)
Print(p);
OUTPUT:
R=int(input(ā€œenter radiusā€));
A=3.14*r*;
P=2*3.14*r
Print(a);
Print(p);
pf3
pf4

Partial preview of the text

Download Introduction to Programming in Python and more Schemes and Mind Maps Programming Languages in PDF only on Docsity!

INTRODUCTION TO PROGRAMMING

Q.1] Write a program in python to find simple interest input principle rate of interest and no of period from user. Input: p=int(input(ā€œenter principleā€)); r=int(input(ā€œenter rateā€)); t=int(input(ā€˜enter time periodā€)); s=prt/ print(s) OUTPUT: Enter principle 10000 Enter rate 5 Enter time period 3

Q.2]Write a program in python to find area of circle and perimeter of the circle. INPUT: R=int(input(ā€œenter radiusā€)); A=3.14r; P=23.14r Print(a) Print(p); OUTPUT: R=int(input(ā€œenter radiusā€)); A=3.14r; P=23.14r Print(a); Print(p);

Q.3]Write a program in python to find the area of triangle. Input base and height from the user. INPUT: H=int(input(ā€œenter heightā€)); B=int(input(ā€œenter baseā€)); A=0.5hb; Print(a); OUTPUT: Enter height 15 Enter base 5

Q.4} diagonal printing INPUT print("this\n\tis\n\t\tmy\n\t\t\tfirst\n\t\t\t\tpython\n\t\t\t\t\tprogram\n\t\t\t\t\t") OUTPUT this is my first

x=1; y=2.8; z=1j; a=float(x); b=int(y); c=complex(x); print(a,b,c); output 1.0 2 (1+0j)