Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Other

Python HandWritten Notes - Simple Programs

Rating
-
Sold
-
Pages
1
Uploaded on
03-04-2025
Written in
2024/2025

Python Practice Simple Programs

Institution
Course

Content preview

SIMPLE PROGRAMS
PROGRAM 1: HELLO WORLD PROGRAM 2: STATIC
print("Hello World") VARIABLES
print(“Welcome to python”) a=10
print(a)
PROGRAM 3: DYNAMIC VARIABLE PROGRAM 4: TYPE OF
a=input("enter value of a") VARIABLE
print(a) a=input("enter value of a")
print(type(a))
PROGRAM 5: SUM OF TWO STATIC PROGRAM 6: SUM OF TWO
NUMBERS DYNAMIC NUMBERS
a=10 a=int(input("enter value of a"))
b=20 b=int(input("enter value of b"))
c = a+b c=a+b
print("sum= ", c) print("sum=", c)
PROGRAM 7: PRINT CHARACTER PROGRAM 8: PRINT STRING
c=’J’ c=”JACK"
print(c) print(c, ”Computer”)
PROGRAM 9: SUM OF THREE PROGRAM 10: SUM OF THREE
NUMBERS NUMBERS
a,b,c=map(int, input("enter three nos:").split()) a,b,c=map(int, input("enter three no
print("sum=",a+b+c) ").split(“,”))
print("sum=",a+b+c)
PROGRAM 11: CONVERT PRICE INTO PROGRAM 12: AREA AND
RUPEES AND PAISA CIRCUMFERENCE
price=float(input("enter a price")) PI=3.14
rs=int(price) R=float(input("enter the radius"))
ps=int((price-rs)*100) A=PI*R*R
print("Rupees=",rs) print("Area=",A)
print("Paisa=",ps) print("Circumference=",2*PI*R)

PROGRAM 13: MONTH AND DAYS PROGRAM 14: POWER
total=int(input("Enter Total Days")) FUNCTION
print("Month=",int(total/30),"Days=",total%30) base=int(input("enter base"))
power=int(input("enter power"))
print("Ans=",pow(base,power))
PROGRAM 15: SWAP TWO NUMBERS PROGRAM 16: SWAP TWO
a=5 NUMBERS
b=10 a=5, b=10
c=a a=a+b
a=b b=a-b
b=c a=a-b
print("After Swapping a=",a,"and b=",b) print("After Swapping a=",a,"and
b=",b)

Written for

Institution
Course

Document information

Uploaded on
April 3, 2025
Number of pages
1
Written in
2024/2025
Type
OTHER
Person
Unknown

Subjects

$3.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
krishparikh

Get to know the seller

Seller avatar
krishparikh Jack Computer
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions