0% found this document useful (0 votes)
7 views1 page

Python Code Golf Challenges for Beginners

The document lists ten coding challenges for Python beginners, including tasks such as reversing a string, calculating the sum of digits, and checking for palindromes. Other challenges involve counting vowels, finding the maximum in a list, determining even or odd numbers, generating Fibonacci sequences, calculating factorials, counting words in a sentence, and creating a frequency dictionary for characters in a string. These exercises aim to enhance basic programming skills in Python.

Uploaded by

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

Python Code Golf Challenges for Beginners

The document lists ten coding challenges for Python beginners, including tasks such as reversing a string, calculating the sum of digits, and checking for palindromes. Other challenges involve counting vowels, finding the maximum in a list, determining even or odd numbers, generating Fibonacci sequences, calculating factorials, counting words in a sentence, and creating a frequency dictionary for characters in a string. These exercises aim to enhance basic programming skills in Python.

Uploaded by

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

Python Beginners – Code Golf Questions

1. Reverse a String: Input a string and print it reversed.

2. Sum of Digits: Input a number and output the sum of its digits.

3. Check Palindrome: Input a string, output 'Yes' if it’s a palindrome, otherwise 'No'.

4. Count Vowels: Input a string and print the count of vowels (a, e, i, o, u).

5. Find Maximum: Input a list of numbers and print the maximum.

6. Even or Odd: Input a number and print 'Even' or 'Odd'.

7. Fibonacci Sequence: Input n and print the first n Fibonacci numbers.

8. Factorial: Input a number and print its factorial.

9. Word Count: Input a sentence and output the number of words.

10. Dictionary Frequency Counter: Input a string and output a dictionary with frequency of
each character.

You might also like