







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A basic introduction to python programming, covering fundamental concepts such as variables, data types, operators, and control flow. It includes practical examples and exercises to help beginners understand the core principles of python programming. Suitable for high school students or anyone starting their journey in programming.
Typology: Study notes
1 / 13
This page cannot be seen from the preview
Don't miss anything!








perimeter=4*a print (“area is”,area) print (“perimeter is”, perimeter)
enter=no. 8 Square is 64
elif == print (“thursday”) elif== print(“friday”) elif== print(“saturday”) else: print(“invalid input”) WAP to enter a no. and check if the no. is positive, negative and zero. Ans. a=int(input(“enter the no.”) If: a>0: Print (a,”is positive”) Elif: a== Print (a,”is zero”) Else: a< print (a, “is negative”) WAP to print a message as per entered age by user.
AGE message <=2 infant <=12 kid <=17 teenager <=59 adult Otherwise senior citizen Ans. a==int(input(“enter the no.”) If a < print (a,“infant”) If a < print (a,“kid”) If a< print (a, “teenager”) If a< print (a,“adult”) Else: (a,“a senior citizen”)
Ans. y=int (input(“enter a year”) If y to 100==0: If y to 400==0: print (“leap year”) Else: print (“not a leap year”)
THANK YOU MADE BY
RO NO. - 42