0% found this document useful (0 votes)
3 views2 pages

Python Programming Challenges Solutions

Uploaded by

srinidhi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Python Programming Challenges Solutions

Uploaded by

srinidhi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd

Question Name Description

Add Two Numbers Read two integers separated by space and print their sum.
Reverse String Read a string and print its reverse.
Factorial Read a non-negative integer n and print n!.
Even or Odd Print Even if the number is even, otherwise print Odd.
Palindrome Check Print True if the string is a palindrome, else print False.
Count Vowels Count the number of vowels (a,e,i,o,u) in a lowercase string.
Sum of List Given numbers separated by spaces, print their sum.
Max Number Print the maximum of given numbers separated by spaces.
Fibonacci Nth Print nth Fibonacci number (0-indexed: F0=0, F1=1).
GCD of Two Numbers Given two integers a and b, print their greatest common divisor.
Test Case Input 1 Test Case Output 1 Test Case Input 2 Test Case Output 2
23 5 10 20 30
hello olleh abcd dcba
5 120 0 1
7 Odd 8 Even
racecar 1 python FALSE
hello 2
1234 10
5391 9
6 8
12 18 6 100 25 25

You might also like