Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add weather check function #48

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add weather check function #48

wants to merge 1 commit into from

Conversation

Hbeyza
Copy link

@Hbeyza Hbeyza commented Jan 12, 2025

This pull request introduces a function to handle different weather conditions based on user input. The function provides appropriate responses for common weather types (sunny, rainy, snowy, cloudy) and handles unexpected inputs gracefully.

Changes:

  • Added check_weather function to provide weather-related messages.
  • Added ask_weather function to take user input and call check_weather.
  • Added main function to initiate the weather checking process.

The function is case-insensitive and responds correctly to known and unknown weather conditions.

Example outputs:

  • Input: "sunny" → Output: "It's bright today!"
  • Input: "rainy" → Output: "Take an umbrella."
  • Input: "windy" → Output: "I don't know this weather."

@Hbeyza Hbeyza added the code challenge challenge for CDS program label Jan 12, 2025
@Hbeyza Hbeyza self-assigned this Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code challenge challenge for CDS program
Projects
Status: READY FOR REVIEW
Development

Successfully merging this pull request may close these issues.

1 participant