About 393,000 results
Open links in new tab
  1. Python time greeting program - Stack Overflow

    Aug 16, 2015 · Here is my Code: import time currentTime = time.strftime('%H:%M') if currentTime.hour < 12 : print('Good morning') if currentTime.hour > 12 : print('Good afternoon') if currentTime.hour > 6 : print('Good evening')

  2. goodnight.py - GitHub

    Oct 30, 2023 · goodnight.py's code is written in Python 3.10 and is not compatible with anterior versions. You can check your Python version by running python --version in your terminal.

  3. CodeCrack12/Greerting-Program-based-on-time-in-Python

    A Python Program Capable of Greeting You With Good Morning, Good Afternoon, Good Evening And Good Night Using time Module.

  4. Python code that outputs a greeting depending on the time

    print('\nGood morning', name) elif 12 <= currentTime.hour < 18: print('\nGood afternoon', name) else: print('\nGood evening', name)

  5. GitHub - Anurag1101/time_module: A simple Python script that …

    A simple Python script that provides a dynamic greeting based on the current time of day. It displays the current time in HH:MM:SS format and returns a greeting such as "Good Morning," "Good Afternoon," "Good Evening," or "Good Night" depending on the hour.

  6. Tips and Examples on How to Say “Good Night” in Code

    Sep 28, 2020 · Python is a versatile language and offers different methods for saying “Good Night” formally. One way to achieve this is using the print statement: print (“Good Night”) You can also set up a function in Python to encapsulate the phrase: good_night () 2.

  7. Need to generate proper greeting when inputting 24 hr time in Python

    Jul 8, 2023 · Program responds with a suitable greeting for the time of day (e.g., “Good morning”, “Good afternoon”, or “Good evening”). I have the below so far which works fine: print("Invalid time entered. Please try again.") if time >= 0 and time <= 1159: print("Good morning!") elif time >= 1200 and time <= 1759: print("Good Afternoon!")

  8. Python Function: Greet User with 'Good night' Message

    Learn how to write a Python function that greets the user with a 'Good night' message.

  9. Python Function Loop Example - CodePal

    Learn how to create functions in Python that display messages using loops. This example demonstrates how to create a function that displays 'Hello World' and 'Goodnight Moon' multiple times.

  10. Python Function: Good Night - CodePal

    Learn how to write a Python function that prints 'Have a good night'. This tutorial will guide you through the steps to create the function and execute it.

  11. Some results have been removed