Artificial Intelligence

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

Artificial Intelligence Term-I Practical

Name : Medhash Rabha


Roll No. 21, Class-IX F

1
INDEX
1. Question1 code and output ………… 3
2. Question2 code and output ………… 4
3. Question3 code and output ………… 5
4. Question4 code and output ………… 6
5. Question5 code and output ………… 7
6. Question6 code and output ………… 8
7. Question7 code and output ………… 9

2
Question-1
Code
cp=int(input("Enter your cost price : "))

profit=int(input("Enter your profit % : "))

tp=(profit/100*cp)

print("Total profit is",tp)

sp=cp+tp

print("Therefore, the selling price is ",sp)

Output

3
Question-Q2
Code :
a=int(input("Enter any number to fint sqaure of it : "))

area=(a*a)

print("Area of side",a,"is",area)

Output :

4
Question-Q3
Code
temp=float(input("Enter the temperature in celcius : "))

fren=(temp*9/5+32)

print("So the given celcius to ferenhite would be",fren)

Output :

5
Question - Q4
Code
maths=int(input("enter your maths marks : "))

sci=int(input("enter your science marks : "))

eng=int(input("enter your english marks : "))

hin=int(input("enter your hindi marks : "))

sst=int(input("enter your social science marks : "))

avg=(sci+maths+sst+eng+hin/5)

print(avg)

Output :

6
Question - Q5
Code
num=int(input("Enter the number : "))

area=num*num

cube=num**3

print("the square of ",num,"is",area,"and the cube is",cube)

Output :

7
Question - Q6
Code
dol=int(input("enter the amount in dollars : "))

rup=dol*80

print("So, in rupees it would be",rup)

Output :

8
Question - Q7
Code
prin=int(input("Enetr the priciple amount : "))

rate=int(input("Enter the rate percentage : "))

time=2

si=prin*rate*time/100

print("So, simple interest is",si)

Output :

You might also like