New paste Repaste Download
gameOne :: IO ()
gameOne = do
    putStrLn "Please enter your name"
    name <- getLine
    putStrLn $ "hellooo " ++ name ++ "! How are you todays?"
    answer <- getLine
    putStrLn $ questionResponse answer
gameTwo :: String -> IO ()
gameTwo strn = do
    if strn == ""
      then do
        putStrLn $ questionResponse strn
        else return ()
questionResponse :: String -> String
questionResponse x =
    case x of
    "good" -> "Alright. glad you're doing well!"
    "bad"  -> "aww. I hope you're doing better!"
    "ok"   -> "thats good. Not too bad."
    "okay" -> "thats good. Not too bad."
    "alright" -> "Alright, huh? thats good!"
    otherwise -> "ANSWER!"
main :: IO ()
main = do
    gameOne
   
    
Filename: potato.hs. Size: 724b. View raw, , hex, or download this file.

This paste expires on 2025-06-17 09:21:53.859761. Pasted through v1-api.