Python program

Python program

Share

Contact information, map and directions, contact form, opening hours, services, ratings, photos, videos and announcements from Python program, Education, kanpur, Kanpur.

25/07/2022

The comments are as important as the code because they describe why a piece of code was written.

When the Python interpreter executes the code, it ignores the comments.

In Python, a single line comment begins with a hash ( #) symbol followed by the comment. For example:

# This is a single line comment in Python

12/04/2022

Python Dates :-A date in Python is not a data type of its own, but we can import a module named datetime to work with dates as date objects.

Example :-
import datetime
x = datetime.datetime.now()
print(x)

07/02/2021

Write a Python program to find those numbers which are divisible by 7 and multiple of 5, between 1500 and 2700 (both included).

nl=[ ]
for x in range(1500, 2701):
if (x%7==0) and (x%5==0):
nl.append(str(x))
print (' , '. join(nl))


Output:

1505,1540,1575,1610,1645,1680,1715,1750,1785,1820,1855,1890,1925,1960,1995,2030,2065,2100,2135,2170,2205,2240,
2275,2310,2345,2380,2415,2450,2485,2520,2555,2590,2625,2660,2695

Want your school to be the top-listed School/college in Kanpur?
Click here to claim your Sponsored Listing.

Category

Culinary Team

Attire

Telephone

Website

Address


Kanpur
Kanpur