diff options
author | TinWoodman92 <chrhodgden@gmail.com> | 2023-05-30 18:34:47 -0500 |
---|---|---|
committer | TinWoodman92 <chrhodgden@gmail.com> | 2023-05-30 18:34:47 -0500 |
commit | 69a427749a4b7c58b3a58ea43aadee985dc2e069 (patch) | |
tree | d13e7527689216478d88a56958fd026cccbbaec5 | |
parent | 801d93de6f914c9ab699cace3934b78a5a74cc9b (diff) |
added color designations for R and Python.
-rw-r--r-- | source_file.py | 12 | ||||
-rw-r--r-- | source_file.r | 13 |
2 files changed, 21 insertions, 4 deletions
diff --git a/source_file.py b/source_file.py index 9fe9788..d55741a 100644 --- a/source_file.py +++ b/source_file.py @@ -1,3 +1,11 @@ -msg = "hello world" +def display_msg(msg): + print( + '\033[93m', + msg, + sep='', + end='\033[0m\n' + ) -print(msg) +msg = "hello world - Python" + +display_msg(msg) diff --git a/source_file.r b/source_file.r index bf041a6..b0bd8d9 100644 --- a/source_file.r +++ b/source_file.r @@ -1,3 +1,12 @@ -msg <- "hello world" +display_msg <- function(msg) { + cat( + '\033[94m', + msg, + sep = '', + end = '\033[0m\n' + ) +} -cat(msg, '\n') +msg <- "hello world - R" + +display_msg(msg) |