From 19f6c101f983b9a3f607aef8fa0f0282fe8d66ad Mon Sep 17 00:00:00 2001 From: Khafiz <116889143+Khafiz246810@users.noreply.github.com> Date: Tue, 15 Nov 2022 23:45:57 +0600 Subject: [PATCH 1/3] Update Console IO.md --- Console IO.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Console IO.md b/Console IO.md index 05e14b1..79ba2be 100644 --- a/Console IO.md +++ b/Console IO.md @@ -1,3 +1,12 @@ ## Running Python in Command-Prompt ![1 de3JlVavp6Fs_tVNoztb6Q](https://user-images.githubusercontent.com/116889143/201987018-03655321-01c2-4031-bc7b-c5db69ff0d5c.png) +## Display values to the Console () + +# print() statement prints / displays information in the console. +``` +Input: +print(“Hello World ! I am trying to learn Python!!”) +Output: +Hello World ! I am trying to learn Python! +``` From 5ad75e46b7f4faafb9b10db5118016928be1763e Mon Sep 17 00:00:00 2001 From: Khafiz <116889143+Khafiz246810@users.noreply.github.com> Date: Tue, 15 Nov 2022 23:58:30 +0600 Subject: [PATCH 2/3] Update Console IO.md --- Console IO.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Console IO.md b/Console IO.md index 79ba2be..58e7a1a 100644 --- a/Console IO.md +++ b/Console IO.md @@ -4,9 +4,18 @@ ## Display values to the Console () # print() statement prints / displays information in the console. -``` +```python Input: print(“Hello World ! I am trying to learn Python!!”) Output: Hello World ! I am trying to learn Python! ``` +# Use the print() Statement to Print a Variable in Python +```python +Input: +var = ‘Hello World !’ +print(var) + +Output : + Hello World ! +``` From 1e42b4f9fc8408476bc1f2b012080a6657541460 Mon Sep 17 00:00:00 2001 From: Khafiz <116889143+Khafiz246810@users.noreply.github.com> Date: Wed, 16 Nov 2022 00:11:32 +0600 Subject: [PATCH 3/3] Update Console IO.md --- Console IO.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/Console IO.md b/Console IO.md index 58e7a1a..ff303c2 100644 --- a/Console IO.md +++ b/Console IO.md @@ -6,16 +6,34 @@ # print() statement prints / displays information in the console. ```python Input: -print(“Hello World ! I am trying to learn Python!!”) +print("Hello World ! I am trying to learn Python!!") Output: Hello World ! I am trying to learn Python! ``` +![Screenshot 2022-11-16 at 00-05-57 Google Colaboratory](https://user-images.githubusercontent.com/116889143/201993612-8d4844fe-8aa2-45ce-b74a-b902ee4dadae.png) + # Use the print() Statement to Print a Variable in Python ```python Input: -var = ‘Hello World !’ +var = "Hello World !" print(var) Output : Hello World ! ``` +![Screenshot 2022-11-16 at 00-07-33 Google Colaboratory](https://user-images.githubusercontent.com/116889143/201993865-f671add0-a4f2-48f8-b21f-5ed487dcfee5.png) + + # Print multiple variables: Use a Comma , to Separate the Variables and Print Them + + ```python + Input: + var1=3242 + var2= "earth " + parint("Hello to the ",var2,var1) + + Output: + Hello to the earth 3242 + ``` + ![Screenshot 2022-11-16 at 00-10-36 Google Colaboratory](https://user-images.githubusercontent.com/116889143/201994477-2c7827eb-fd92-419b-aab0-d0446328e73a.png) + +