Practical File AI - Class 10
Practical File AI - Class 10
PRACTICAL COPY
#Write a program in Python to print String in output Screen
# understanding output
print("Hello\nSir")
print("I am",end = " ")
print("Student of")
print("KV No 2 Sagar")
--------------------------------------------------------------------------------------------------------------------------
# Write a program in Python to input name and age and print it
#Program to Print Name and Age
nm = input("Enter your name : ")
age = input("Enter your age : ")
res1 = a + b
res2 = a * b
m2 = num1*2
m3 = num1*3
m4 = num1*4
m5 = num1 *5
if(cp>sp):
ans = cp - sp
print("Loss for Rs. ",ans)
elif(sp>cp):
ans = sp - cp
print("Pro it for Rs. ",ans)
else:
print("No Pro it No Loss")
--------------------------------------------------------------------------------------------------------------------------
# Write a program in Python to input the marks of students and ind Pass or Fail
#Student pass or fail
mrk = int(input("Enter Marks of Student : "))
if(num<0):
num = -1*num
print("Absolute number is :",num)
--------------------------------------------------------------------------------------------------------------------------
# Write a program in Python to input Marks and print the grade based on the marks
# Program to ind grade
print("Program to ind grade of student ")
nm = input("Student name : ")
mrk = int(input("Enter student marks : "))
if(mrk>=90):
print("Grade of ",nm," is A")
elif(mrk>=60):
print("Grade of ",nm," is B")
elif(mrk>=33):
print("Grade of ",nm," is C")
else :
print("Grade of ",nm," is F")
--------------------------------------------------------------- -----------------------------------------------------------
# Write a program in Python to input Marks and print the grade based on the marks
--------------------------------------------------------------------------------------------------------------------------