Recommended
PPTX
PYTHON PROGRAMMING INTERVIEW QUESTIONS.pptx
DOCX
Computer Science Class 11 Practical File.docx
PDF
PDF
Anton Kasyanov, Introduction to Python, Lecture4
PDF
PDF
PDF
Python for High School Programmers
PDF
PyLecture4 -Python Basics2-
DOCX
Python lab manual all the experiments are available
DOCX
CBSE Class 12 Computer practical Python Programs and MYSQL
PDF
PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...
PDF
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
PDF
Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...
PDF
PDF
PPTX
PDF
Master Python in 15 Days.pdf
PDF
50_coding_challengesfffffffffffffffffffffffffffffffffffffffffffffffffffffffff...
PDF
PDF
All homework and exams in one file.pdf
PDF
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems Review
PDF
Bit-wise Operation Slides
PDF
PDF
Introduction to r bddsil meetup
PDF
Python Lab manual program for BE First semester (all department
PPTX
Practise best aws it is just use this Questions.pptx
PDF
CaseWare Data Scientist test.
PDF
AI_Lab_File()[1]sachin_final (1).pdf
PPTX
1111111111111data structure avl TREE.pptx
PPTX
11111111111111111111111111Bubble sort.pptx
More Related Content
PPTX
PYTHON PROGRAMMING INTERVIEW QUESTIONS.pptx
DOCX
Computer Science Class 11 Practical File.docx
PDF
PDF
Anton Kasyanov, Introduction to Python, Lecture4
PDF
PDF
PDF
Python for High School Programmers
PDF
PyLecture4 -Python Basics2-
Similar to week3.pptx python related programs and outputs
DOCX
Python lab manual all the experiments are available
DOCX
CBSE Class 12 Computer practical Python Programs and MYSQL
PDF
PYTHONOr else the work is fine only. Lot to learn buddy.... Improve your basi...
PDF
8799.pdfOr else the work is fine only. Lot to learn buddy.... Improve your ba...
PDF
Or else the work is fine only. Lot to learn buddy.... Improve your basics in ...
PDF
PDF
PPTX
PDF
Master Python in 15 Days.pdf
PDF
50_coding_challengesfffffffffffffffffffffffffffffffffffffffffffffffffffffffff...
PDF
PDF
All homework and exams in one file.pdf
PDF
ACM ICPC 2013 NEERC (Northeastern European Regional Contest) Problems Review
PDF
Bit-wise Operation Slides
PDF
PDF
Introduction to r bddsil meetup
PDF
Python Lab manual program for BE First semester (all department
PPTX
Practise best aws it is just use this Questions.pptx
PDF
CaseWare Data Scientist test.
PDF
AI_Lab_File()[1]sachin_final (1).pdf
More from doramira833
PPTX
1111111111111data structure avl TREE.pptx
PPTX
11111111111111111111111111Bubble sort.pptx
PPTX
week2.pptx program program program problems
PPTX
Full Wave Rectifier (1).pptx its theory advantages and disadvantages
PPTX
3-Phase Induction Motor.pptx with clear explanation
PPTX
Python expampless problems with output and reason
Recently uploaded
PPTX
Chikitsa Yojana of Urahkshata Roga......
PDF
🥳 BUKTI KEMENANGAN HARI INI SELASA 03 FEBRUARI 2026 🥰
PPTX
etics.pptxghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh...
PDF
Art Therapy for Autism Creative Growth..
PPTX
Blueprint Symbols & Learning to Draw a Floor Plan
PPTX
Urban Planning Practice in the Philippines.pptx
DOCX
Felix's Research project final copy.docx
PDF
Architectural Professional portfolio designs.pdf
PDF
urahkhata chikitsa Yojana complete......
PPTX
Noora_Custom_Color_HIV_TB_Flowchart.pptx
PPTX
2D Transformation (Translation, Rotation, Scaling) in Computer Graphics
PPTX
Mogul Interior Armoires: Maximalist Poetry in Wood
PDF
CASE STUDY about Shreyas wellness Center, Quiet healing center; Auroville
PDF
Early Nozzle (Now Amp) Explainer, Presented at company offsite in Ireland
PPTX
ENGLISH DICTIONARY PORTFOLIO FOR EVENTS.
PPTX
How High-Quality Images Increase Online Sales
PPTX
Traditional Indian Textiles by DRSP.pptx
PPTX
TLE - FCS 7 - Introduction to Technical Drawing.pptx
PPTX
Pathological Fractures Lecture.pptx ORTHOPAEDICS
week3.pptx python related programs and outputs 1. 2. 1.Aim: i) Write a program to convert a list and tuple
into arrays.
def convert(list):
return tuple(i for i in
list)
list = [1, 2, 3, 4]
print(convert(list))
OUTPUT:
(1, 2, 3, 4)
3. array1 = [1, 2, 3, 4, 5]
array2 = [4, 5, 6, 7, 8]
common_values = set(array1)&set(array2)
print("The common values between the two
arrays are:", list(common_values))
Output:
The common values between the two arrays are:
[4, 5]
Aim: ii) Write a program to find common values
between two arrays.
4. def gcd(a, b):
"""
Returns the greatest common divisor of two
integers a and b.
"""
while b != 0:
a, b = b, a % b
return a
print(gcd(12,8))
print(gcd(30,45))
2)Aim:Write a function called gcd that takes parameters a and
b and returns their greatest common divisor.
5. 6. def isPalindrome(str):
for i in range(0, int(len(str)/2)):
if str[i] != str[len(str)-i-1]:
return False
return True
s = "malayalam"
ans = isPalindrome(s)
if (ans):
print("Yes")
else:
print("No")
3)Aim: Write a function called palindrome that takes a string
argument and returnsTrue if it is a palindrome and False
otherwise. Remember that you can use the built-in function len to
check the length of a string.
7.