0% found this document useful (0 votes)
14 views

Class 7 Programs

Uploaded by

kumarayush221104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Class 7 Programs

Uploaded by

kumarayush221104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Youtube channel : New Ideas yt को Subscribe जरुर करे By Sahu Satyam | +91 7607418817

3. Introduction to python

© Copyright All Rights Reserved. New ideas yt & http://www.examjila.com


Youtube channel : New Ideas yt को Subscribe जरुर करे By Sahu Satyam | +91 7607418817

1. print your name

print("satyam sahu")
Output:

satyam sahu

Video Solution: Click Here

2. print Your name 5 times

print("satyam sahu\n"*5)
Output:

satyam sahu
satyam sahu
satyam sahu
satyam sahu
satyam sahu

3. print your name with greeting(Hello/Good Morning) and should be


access from variable.

name="satyam sahu"
print("Good Morning ", name)
Output:

Good Morning satyam sahu

© Copyright All Rights Reserved. New ideas yt & http://www.examjila.com


Youtube channel : New Ideas yt को Subscribe जरुर करे By Sahu Satyam | +91 7607418817

4. Python program to add two numbers.

print("Enter first number")


num1=int(input())
print("Enter Second number")
num2=int(input())
print(num1+num2)

Output:

Enter first number


25
Enter Second number
40
65

#Python program to add two numbers.


num1=int(input("Enter first number"))
num2=int(input("Enter Second number"))
print("The sum of", num1, "and", num2 ,"is =", num1+num2)

Output:

Enter first number25


Enter Second number45
The sum of 25 and 45 is = 70

5. Python Program for to find area of a circle.

r=int(input("Enter radius of circle"))


area = 3.14*r*r
© Copyright All Rights Reserved. New ideas yt & http://www.examjila.com
Youtube channel : New Ideas yt को Subscribe जरुर करे By Sahu Satyam | +91 7607418817

print("The area of circle is= ", area)

Output:

Enter radius of circle7


The area of circle is= 153.86

6. Python Program for Simple interest calculation.

p=int(input("Enter Principal"))
r=int(input("Enter Rate of intrest"))
t=int(input("Enter time"))
si=(p*r*t)/100
print("The simple intrest is =",si)

Output:

Enter Principal1000
Enter Rate of intrest5
Enter time2
The simple intrest is = 100.0

7. Python Program to take the temperature in Celsius and convert it to


Fahrenheit.

celsius = int(input("Enter the Temperature in Celsius :\n"))


fahrenheit = (9/5 * celsius) + 32
print("Temperature in Fahrenheit :", fahrenheit)

Output:

© Copyright All Rights Reserved. New ideas yt & http://www.examjila.com


Youtube channel : New Ideas yt को Subscribe जरुर करे By Sahu Satyam | +91 7607418817

Enter the Temperature in Celsius :

10

Temperature in Fahrenheit : 50.0

© Copyright All Rights Reserved. New ideas yt & http://www.examjila.com


Youtube channel : New Ideas yt को Subscribe जरुर करे By Sahu Satyam | +91 7607418817

© Copyright All Rights Reserved. New ideas yt & http://www.examjila.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy