#reverse number
#while_loop
n = int(input("enter the value: "))
rev = 0
while n != 0:
rem = n%10
rev = rev*10 + rem
n = n//10
print("Reverse number",rev)
#while_loop
n = int(input("enter the value: "))
rev = 0
while n != 0:
rem = n%10
rev = rev*10 + rem
n = n//10
print("Reverse number",rev)
#sum of digits
#while_loop
n = int(input("enyer the value : "))
sum = 0
while n != 0:
rem = n%10
sum += rem
n = n//10
print("sum of digits",sum)
#while_loop
n = int(input("enyer the value : "))
sum = 0
while n != 0:
rem = n%10
sum += rem
n = n//10
print("sum of digits",sum)
#HANUMAN
from colorama import Fore
#H letter
for i in range(7):
for j in range(5):
if i in {0,1,2,3,4,5,6} and j in {0,4} or i in {3} and j in {1,2,3}:
print(Fore.BLUE+"*",end=" ")
else:
print(" ",end=" ")
print()
print()
#A
for i in range(7):
for j in range(5):
if i in {1,2,3,4,5,6} and j in {0,4} or i in {0,3} and j in {1,2,3}:
print(Fore.RED+"*",end=" ")
else:
print(" ",end=" ")
print()
print()
#N
for i in range(7):
for j in range(7):
if i in {0,1,2,3,4,5,6} and j in {0,6} or i==j :
print(Fore.YELLOW+"*",end=" ")
else:
print(" ",end=" ")
print()
print()
#U
for i in range(7):
for j in range(6):
if i in {0,1,2,3,4} and j in {0,5} or i in {5} and j in {1,2,3,4} :
print(Fore.GREEN+"*",end=" ")
else:
print(" ",end=" ")
print()
print()
#M
for i in range(7):
for j in range(7):
if i in {0,1,2,3,4,5,6} and j in {0,6} or i in {1} and j in {1,5} or i in {2} and j in {2,4} or i in {3} and j in {3} :
print(Fore.MAGENTA+"*",end=" ")
else:
print(" ",end=" ")
print()
print()
#A
for i in range(7):
for j in range(5):
if i in {1,2,3,4,5,6} and j in {0,4} or i in {0,3} and j in {1,2,3} :
print(Fore.CYAN+"*",end=" ")
else:
print(" ",end=" ")
print()
print()
#N
for i in range(7):
for j in range(7):
if i in {0,1,2,3,4,5,6} and j in {0,6} or i==j:
print(Fore.WHITE+"*",end=" ")
else:
print(" ",end=" ")
print()
#to see the output and comment that output
from colorama import Fore
#H letter
for i in range(7):
for j in range(5):
if i in {0,1,2,3,4,5,6} and j in {0,4} or i in {3} and j in {1,2,3}:
print(Fore.BLUE+"*",end=" ")
else:
print(" ",end=" ")
print()
print()
#A
for i in range(7):
for j in range(5):
if i in {1,2,3,4,5,6} and j in {0,4} or i in {0,3} and j in {1,2,3}:
print(Fore.RED+"*",end=" ")
else:
print(" ",end=" ")
print()
print()
#N
for i in range(7):
for j in range(7):
if i in {0,1,2,3,4,5,6} and j in {0,6} or i==j :
print(Fore.YELLOW+"*",end=" ")
else:
print(" ",end=" ")
print()
print()
#U
for i in range(7):
for j in range(6):
if i in {0,1,2,3,4} and j in {0,5} or i in {5} and j in {1,2,3,4} :
print(Fore.GREEN+"*",end=" ")
else:
print(" ",end=" ")
print()
print()
#M
for i in range(7):
for j in range(7):
if i in {0,1,2,3,4,5,6} and j in {0,6} or i in {1} and j in {1,5} or i in {2} and j in {2,4} or i in {3} and j in {3} :
print(Fore.MAGENTA+"*",end=" ")
else:
print(" ",end=" ")
print()
print()
#A
for i in range(7):
for j in range(5):
if i in {1,2,3,4,5,6} and j in {0,4} or i in {0,3} and j in {1,2,3} :
print(Fore.CYAN+"*",end=" ")
else:
print(" ",end=" ")
print()
print()
#N
for i in range(7):
for j in range(7):
if i in {0,1,2,3,4,5,6} and j in {0,6} or i==j:
print(Fore.WHITE+"*",end=" ")
else:
print(" ",end=" ")
print()
#to see the output and comment that output
Python programming codes pinned «#HANUMAN from colorama import Fore #H letter for i in range(7): for j in range(5): if i in {0,1,2,3,4,5,6} and j in {0,4} or i in {3} and j in {1,2,3}: print(Fore.BLUE+"*",end=" ") else: print(" ",end=" ") …»
What type of error is shown when you use a variable without assigning an initial value?
Anonymous Quiz
18%
Not assigned
27%
Not declared
55%
Not defined
0%
Not a variable
What will be the output after the following statements?
a = 15
b = a a = 25 print(a,b)
a = 15
b = a a = 25 print(a,b)
Anonymous Quiz
0%
a 15
58%
25 15
0%
25 a
42%
15 25
a=5
b=5
print((a > b and "a > b") or (b > a and "b > a"))
b=5
print((a > b and "a > b") or (b > a and "b > a"))
Anonymous Quiz
8%
equal
38%
True
31%
False
23%
Error
Python programming codes pinned «a=5
b=5
print((a > b and "a > b") or (b > a and "b > a"))»
b=5
print((a > b and "a > b") or (b > a and "b > a"))»
a = 0
b = 5
c = 10 a = b b = c c = a print(a, b, c)
b = 5
c = 10 a = b b = c c = a print(a, b, c)
Anonymous Quiz
38%
0 5 10
15%
5 5 10
38%
5 10 5
8%
5 10 10
Forwarded from SMW Services
python interview question with answer.pdf
5.7 KB
python interview question with answer.pdf
🌞 Good Morning guys 🌞
Don't miss this opportunity!
Bookmark this page and dive into my curated curriculum.
Eager to learn Data Engineering?
Ive crafted a comprehensive, free Data Engineering course just for you!
29 Free lessons to get you interview-ready and move ahead of 90% of people.
1. DE Roadmap: https://lnkd.in/dZBfE3Eq
2. Master Python: https://lnkd.in/e5rCbvP8
3. Learn SQL: https://lnkd.in/efMKFkfX 4. Learn MySQL: https://lnkd.in/efk-Mi3c
5. Learn MongoDB: https://lnkd.in/eMKPWtqX
6. Dominate PySpark: https://lnkd.in/exwA2hKz
7. Learn Bash, Airflow & Kafka: https://lnkd.in/eyN6u2yd
8. Learn Git & GitHub: https://lnkd.in/eX_Q8s99 9. Learn How to Structure Project: https://lnkd.in/dWwnYbA3
10. Learn CICD basics: https://lnkd.in/epKGVFY
11. Decode Data Warehousing: https://lnkd.in/eKnVbFAB
12. Leam DBT: : https://lnkd.in/eG9eaEuE
13. Learn Data Lakes: https://lnkd.in/eQ9xxAJT
14. Learn DataBricks: https://lnkd.in/ePZpCv86
15. Learn Azure Databricks: https://lnkd.in/eBij4akJ 16. Leam Snowflake: https://lnkd.in/erETmtFU
17. Learn Apache NiFi: http://bit.ly/43btwy
18. Leam Debezium: http://bit.ly/3K6W5gL
Don't miss this opportunity!
Bookmark this page and dive into my curated curriculum.
Eager to learn Data Engineering?
Ive crafted a comprehensive, free Data Engineering course just for you!
29 Free lessons to get you interview-ready and move ahead of 90% of people.
1. DE Roadmap: https://lnkd.in/dZBfE3Eq
2. Master Python: https://lnkd.in/e5rCbvP8
3. Learn SQL: https://lnkd.in/efMKFkfX 4. Learn MySQL: https://lnkd.in/efk-Mi3c
5. Learn MongoDB: https://lnkd.in/eMKPWtqX
6. Dominate PySpark: https://lnkd.in/exwA2hKz
7. Learn Bash, Airflow & Kafka: https://lnkd.in/eyN6u2yd
8. Learn Git & GitHub: https://lnkd.in/eX_Q8s99 9. Learn How to Structure Project: https://lnkd.in/dWwnYbA3
10. Learn CICD basics: https://lnkd.in/epKGVFY
11. Decode Data Warehousing: https://lnkd.in/eKnVbFAB
12. Leam DBT: : https://lnkd.in/eG9eaEuE
13. Learn Data Lakes: https://lnkd.in/eQ9xxAJT
14. Learn DataBricks: https://lnkd.in/ePZpCv86
15. Learn Azure Databricks: https://lnkd.in/eBij4akJ 16. Leam Snowflake: https://lnkd.in/erETmtFU
17. Learn Apache NiFi: http://bit.ly/43btwy
18. Leam Debezium: http://bit.ly/3K6W5gL
Linkedin
Brij kishore Pandey on LinkedIn: #dataengineering #data | 151 comments
If you're looking to start a career in data engineering or considering a career switch, you should focus on following key areas -
𝗗𝗮𝘁𝗮… | 151 comments on LinkedIn
𝗗𝗮𝘁𝗮… | 151 comments on LinkedIn