Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

saadfrhan/python-exercises

Open more actions menu

Repository files navigation

Python Exercises

  • 0_greet_user.py: A simple script that prompts the user for their name and prints a personalized greeting.
  • 1_even_or_odd.py: Takes an integer as input and determines whether it is an even or odd number.
  • 2_calculate_average.py: Collects ten numbers from the user and calculates their average.
  • 3_max_min_average.py: Continuously takes numerical input until the user types "done", then prints the maximum, minimum, and average of the entered numbers.
  • 4_refactored_max_min_average.py: A refactored version of 3_max_min_average.py, utilizing functions for input collection and data printing to improve code organization.
  • 5_is_palindrome.py: Checks if a given word (input by the user) is a palindrome.
  • 6_is_prime.py: Determines if a given integer (input by the user) is a prime number.
  • 7_fizzbuzz.py: Implements the classic FizzBuzz game, printing "Fizz", "Buzz", or "FizzBuzz" for numbers up to a specified limit.
  • 8_number_guessing_game.py: A simple game where the user tries to guess a randomly generated number between 1 and 100, receiving hints if their guess is too high or too low.

About

Python Exercises

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.