#program to print 1 to 2000 armstrong numbers
n=2000
for num in range(1,n+1):
order=len(str(num))
sum=0
temp=num
while temp>0:
digit=temp%10
sum+=digit**order
temp//=10
if(num==sum):
print(num)
n=2000
for num in range(1,n+1):
order=len(str(num))
sum=0
temp=num
while temp>0:
digit=temp%10
sum+=digit**order
temp//=10
if(num==sum):
print(num)
"""Armstrong number checking only one number
source code"""
num=int(input("enter the number :"))
sum=0
temp=num
while temp>0:
digit=temp%10
sum+=digit**3
temp//=10
if num==sum:
print(num," is Armstrong number")
else:
print(num," is not Armstrong number")
source code"""
num=int(input("enter the number :"))
sum=0
temp=num
while temp>0:
digit=temp%10
sum+=digit**3
temp//=10
if num==sum:
print(num," is Armstrong number")
else:
print(num," is not Armstrong number")
#Display the calendar by using the python code
import calendar #first import the calendar library module
year = 2023 #mention the past or present or future years
month = 1 #mention the 1 to 12 month numbers ∆∆ starting with no zero (0) mention ortherwise the program error display
#then after the print operation to display the output
print(calendar.month(year,month))
import calendar #first import the calendar library module
year = 2023 #mention the past or present or future years
month = 1 #mention the 1 to 12 month numbers ∆∆ starting with no zero (0) mention ortherwise the program error display
#then after the print operation to display the output
print(calendar.month(year,month))
#String operations first one concatenation
string1 = "Hello"
string2 = "World"
concatenated_string = string1 + " " + string2
print(concatenated_string) # "Hello World"
string1 = "Hello"
string2 = "World"
concatenated_string = string1 + " " + string2
print(concatenated_string) # "Hello World"
#String operations third one is Indexing
string = "Hello World!"
print(string[0]) # "H"
print(string[-1]) # "!"
print(string[7]) # "o"
print(string[-7]) # " "
print(string[5]) # " "
print(string[11]) # "!"
string = "Hello World!"
print(string[0]) # "H"
print(string[-1]) # "!"
print(string[7]) # "o"
print(string[-7]) # " "
print(string[5]) # " "
print(string[11]) # "!"
🔰 List of all errors 🔰
- 400 (Bad request)
- 401 (Authorization required)
- 402 (Payment required)
- 403 (Forbidden)
- 404 (Not found)
- 405 (Method not allowed)
- 406 (Not acceptable)
- 407 (Proxy authentication required)
- 408 (Request Timeout)
- 409 (Conflict)
- 410 (Gone)
- 411 (Length required)
- 412 (Precondition failed)
- 413 (Request entity too large)
- 414 (Request URI too large)
- 415 (Unsupported media type)
- 416 (Request range not satisfiable)
- 417 (Expectation failed)
- 422 (Unprocessable entity)
- 423 (Locked)
- 424 (Failed dependency)
- 500 (Internal server error)
- 501 (Not Implemented)
- 502 (Bad gateway)
- 503 (Service unavailable)
- 504 (Gateway timeout)
- 505 (HTTP version not supported)
- 506 (Variant also negotiates)
- 507 (Insufficient storage)
- 510 (Not extended)
- 400 (Bad request)
- 401 (Authorization required)
- 402 (Payment required)
- 403 (Forbidden)
- 404 (Not found)
- 405 (Method not allowed)
- 406 (Not acceptable)
- 407 (Proxy authentication required)
- 408 (Request Timeout)
- 409 (Conflict)
- 410 (Gone)
- 411 (Length required)
- 412 (Precondition failed)
- 413 (Request entity too large)
- 414 (Request URI too large)
- 415 (Unsupported media type)
- 416 (Request range not satisfiable)
- 417 (Expectation failed)
- 422 (Unprocessable entity)
- 423 (Locked)
- 424 (Failed dependency)
- 500 (Internal server error)
- 501 (Not Implemented)
- 502 (Bad gateway)
- 503 (Service unavailable)
- 504 (Gateway timeout)
- 505 (HTTP version not supported)
- 506 (Variant also negotiates)
- 507 (Insufficient storage)
- 510 (Not extended)
👍2
Python programming codes pinned «🔰 List of all errors 🔰 - 400 (Bad request) - 401 (Authorization required) - 402 (Payment required) - 403 (Forbidden) - 404 (Not found) - 405 (Method not allowed) - 406 (Not acceptable) - 407 (Proxy authentication required) - 408 (Request Timeout)…»
Normal people's and programmers using words in regular life
Normal people's : programmers
Empty : Null
Fixing : Debugging
And so on : loops
Every single : for each
1 : 0
English, Hindi, German : python, Java, c++
Problems : Bugs
Human : object
Normal people's : programmers
Empty : Null
Fixing : Debugging
And so on : loops
Every single : for each
1 : 0
English, Hindi, German : python, Java, c++
Problems : Bugs
Human : object
Is Python case sensitive when dealing with identifiers?
Anonymous Quiz
83%
yes
17%
no
0%
machine dependent
0%
noen of the above
Why are local variable names beginning with an underscore discouraged?
Anonymous Quiz
0%
they slow down execution
33%
they are used to indicate global variables
50%
they are used to indicate a private variables of a class
17%
they confuse the interpreter
All keywords in Python are in ________
Anonymous Quiz
50%
lower case
0%
Capitalized
17%
UPPER CASE
33%
all of these
join this and discuss programming in Telugu @coding_teluguchat
Which of the following is true for variable names in Python?
Anonymous Quiz
60%
unlimited length
0%
all private members must have leading and trailing underscores
20%
underscore and ampersand are the only two special characters allowed
20%
none of the above
Which of the following is an invalid statement?(python)
Anonymous Quiz
40%
abc = 1,000,000
40%
a b c = 1000 2000 3000
0%
a,b,c = 1000, 2000, 3000
20%
a_b_c = 1,000,000