Skip to content
Sign upLog in
← Back to Community

Python daily dose (republished)

Profile icon
ParthChawla

Hello there, welcome to python daily dose
DAY 1

So some of you guys asked me to add more content on my daily dose. Thus I republished it again for you guys. As everyone knows the print statement (If not please visit my last post), So I will now teach you about variables and input in python :)

VARIABLES :
So variables are just made to store values. For example you wanted to store your credit card number in python. How will you do it? That's where it comes in handy.
So you can do it like:

mynumber=12344321

Here, mynumber is a variable and 12344321 is the data stored in it
BONUS :
*Do you know? We can also use the print command in the variables :)
Here is a example

image

Result:

image

So as you got it, Let's go to the input command.

Input:

So if, you wanted that your program should ask you a question and you can reply it. How will you do it? Well, here is the answer:

I will use the input() fuction in python. But how?

Here is the Syntax

image

Result:

image

So you can even say that what to do if input greater than or smaller than a number, What would I do if I want to temporarily store the input data, what if I wanted to give result after the input? You will see that tommorow at the python daily dose.

If you have any problems,questions or feedback, write it down in the comments. Currently I cannot zoom the code so if you still have any problem seeing the code, feel free to write it down in the comments

See you in the next Daily dose ;)

Voters
Profile icon
DynamicSquid
Profile icon
userSM
Profile icon
Leroy01010
Profile icon
ParthChawla
Comments
hotnewtop
Profile icon
Leroy01010

nice!!

Profile icon
ParthChawla

@Leroy01010
, Thanks, for that. I post this daily so do not forget to read the next daily dose which I am going to publish today :)

Profile icon
CodingCactus

just do one big tutorial instead of 'daily dose'

Profile icon
ParthChawla

@CodingCactus
, I cannot do that. Please stick to the daly rule

Profile icon
ParthChawla

@CodingCactus
, Please join me everyday 8 to 9 pm (India time) to code with me. If you want to then just reply yes or no in the comments

Profile icon
CodingCactus

@ParthChawla
nope, I know how to code. I did a big tutorial already https://how-to-python.codingcactus.repl.co

Profile icon
ParthChawla

@CodingCactus
, I will not teach you anything if you don't want. I am just inviting you to code. If you don't want then no problem