Hello readers,
Today, we are going to see that how can we print the calendar using python.
Print calendar using python |
In this blog you are going to see that how can you print calendar using python programming language. To perform this activity you must know the basics of python because we are going to use python programming language.
To perform this activity you must have to install python on your laptop or desktop. If you don't know that how to install python then follow these steps.
To install python perform the following steps :-
1) Go to - https://www.python.org/downloads/
2) click "Download" .
3) Download the any latest python version from the given website .
4) When download complete just open your file explorer and double click on downloaded python file and install the python in which directory you want.
5) After the successful installation just double click on python icon on desktop to open python IDE.
python logo |
After the successful installation of python you need a IDE which support python. I am using VS code(Visual studio code), you can use pycharm or python ide too.
how to install VS Code?
To install VS code(Visual Studio code) follow these steps :-
1) Go to - https://code.visualstudio.com/download
2) Select your system which you are using, it is MacOS , Linux or Windows and download according to your system architecture.
3) Once download is complete run the installer file (.exe file).
4) Agree the terms and condition and click on next and then select the directory where to store the files of VS code.
5) After one or two permission VS code will starts installing on your system.
6) Go to the desktop icon and double click it to open.
VS Code |
How to install Pycharm?
To install Pycharm follow these steps :-
1) Go to - https://www.jetbrains.com/pycharm/download/#section=windows
2) Select community and start downloading.
3) Once the downloading is completed click on the installer file(.exe file).
4) Now agree the terms and conditions and go on.
5) Select the directory where Pycharm can store their files and updates.
6) After the successful installation go to desktop and double click on pycharm icon to open.
pycharm |
To run this code you need to install one module "pip install calendar".
To install this module open cmd(command prompt) and type pip install calendar
After successful installation of module type the code and execute the program and see the output in Terminal.
code :- import calendar
year = 2021
month = 6
print(calendar.month(year,month))
Comments
Post a Comment
Thank you for sharing this.
You’re helping us become better. Want to stay in the loop? Subscribe to our YouTube channel.