Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions program no 1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Program no 1

print "Twinkle, twinkle, little star,\n\tHow I wonder what you are,\n\t\tUp above the world so high!\n\t\tLike a diamond in the sky.\nHow I wonder what you are,\n\tUp above the world so high"
7 changes: 7 additions & 0 deletions program2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Program no 2

import sys
print("Python version")
print (sys.version)
print("Version info.")
print (sys.version_info)
9 changes: 9 additions & 0 deletions program3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Program no 3

from datetime import datetime
# datetime object containing current date and time
now = datetime.now()


dt_string = now.strftime("%d/%m/%Y %H:%M:%S")
print("date and time =", dt_string)
6 changes: 6 additions & 0 deletions program4.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Program no 4

from math import pi

radius = float(input ("Input the radius of the circle : "))
print ("The area of the circle with radius " + str(radius) + " is: " + str(pi * radius**2))
7 changes: 7 additions & 0 deletions program5.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Program no 5

1stname = input(" Enter 1st name ")
lastname = input(" Enter last name ")

print 1stname[::-1]
print lastname[::-1]
6 changes: 6 additions & 0 deletions program6.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Program no 6

num1 = input(" Enter 1st num ")
num2 = input(" Enter second num ")

print ("The addition of num1 and num2 is : "num1+num2)
Binary file added py assigment 1.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.