3. Write and execute simple Python code for the given problem variable vs Identifier.
5. Python keywords—
Identation, Quotation, Suits & Comment.
2
Week 2nd Report
3
Week 3rd report
4
Week 4th Report
5
Week 5th Report
1. Introduction to function
Create a simple Python function to add two numbers.
2. Use of return in function, arguments & parameters, type of argument
WAP to create function with all function argument.
3. Function inside function, modules. Type of importing modules.
4. WAP to create two different Python files & Pass values from one file & perform arithmetic
operation in second file & return result to first file.
5. Python class , Class object & attributes self & init, Create a class & solve given problems.
6. File handling Python , open() opening file various mode.
6
Week 6th Report
1. Reading data from file, Writing of appending data to file creating file, copying data from
one file to another file, deleting file.
4. GUI programming, tile , geometry, creating label & button, adding image, button on click.
7
Project Code
Current Date , Time Format
import datetime
now = datetime.datetime.now()
print
print ("Current date and time using str method of datetime object:")
print (str(now))
print
print ("Current date and time using instance attributes:")
print ("Current year: %d" % now.year)
print ("Current month: %d" % now.month)
print ("Current day: %d" % now.day)
print ("Current hour: %d" % now.hour)
print ("Current minute: %d" % now.minute)
print ("Current second: %d" % now.second)
print ("Current microsecond: %d" % now.microsecond)
print
print ("Current date and time using strftime:")
print (now.strftime("%Y-%m-%d %H:%M"))
print
print ("Current date and time using isoformat:")
8
print (now.isoformat())
Output