|  | 
|  | 1 | +{ | 
|  | 2 | + "cells": [ | 
|  | 3 | + { | 
|  | 4 | + "cell_type": "code", | 
|  | 5 | + "execution_count": 1, | 
|  | 6 | + "id": "f6959082-2f25-4949-b487-635253ea2219", | 
|  | 7 | + "metadata": {}, | 
|  | 8 | + "outputs": [ | 
|  | 9 | + { | 
|  | 10 | + "name": "stdin", | 
|  | 11 | + "output_type": "stream", | 
|  | 12 | + "text": [ | 
|  | 13 | + "Enter the time: 5\n" | 
|  | 14 | + ] | 
|  | 15 | + }, | 
|  | 16 | + { | 
|  | 17 | + "name": "stdout", | 
|  | 18 | + "output_type": "stream", | 
|  | 19 | + "text": [ | 
|  | 20 | + "Good Morning\n" | 
|  | 21 | + ] | 
|  | 22 | + } | 
|  | 23 | + ], | 
|  | 24 | + "source": [ | 
|  | 25 | + "import time\n", | 
|  | 26 | + "clock=int(input(\"Enter the time:\"))\n", | 
|  | 27 | + "if (clock>=4 and clock<12):\n", | 
|  | 28 | + " print(\"Good Morning\")\n", | 
|  | 29 | + "elif (clock>=12 and clock<17):\n", | 
|  | 30 | + " print(\"Good Afternoon\")\n", | 
|  | 31 | + "elif (clock>17 and clock<21):\n", | 
|  | 32 | + " print(\"Good Evening\")\n", | 
|  | 33 | + "else:\n", | 
|  | 34 | + " print(\"Good Night\")" | 
|  | 35 | + ] | 
|  | 36 | + } | 
|  | 37 | + ], | 
|  | 38 | + "metadata": { | 
|  | 39 | + "kernelspec": { | 
|  | 40 | + "display_name": "Python [conda env:base] *", | 
|  | 41 | + "language": "python", | 
|  | 42 | + "name": "conda-base-py" | 
|  | 43 | + }, | 
|  | 44 | + "language_info": { | 
|  | 45 | + "codemirror_mode": { | 
|  | 46 | + "name": "ipython", | 
|  | 47 | + "version": 3 | 
|  | 48 | + }, | 
|  | 49 | + "file_extension": ".py", | 
|  | 50 | + "mimetype": "text/x-python", | 
|  | 51 | + "name": "python", | 
|  | 52 | + "nbconvert_exporter": "python", | 
|  | 53 | + "pygments_lexer": "ipython3", | 
|  | 54 | + "version": "3.12.7" | 
|  | 55 | + } | 
|  | 56 | + }, | 
|  | 57 | + "nbformat": 4, | 
|  | 58 | + "nbformat_minor": 5 | 
|  | 59 | +} | 
0 commit comments