-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add more programs to help beginners, feel free to fork and contribute #1
Comments
`# use hash-tag to write comments that are not counted as code use equal to sign to assign value to variablesinteger = 1 integer variable types are numbers without any decimal pointsfloat = 1.0 float variable types are numbers with decimal pointsstring = "1" anything can be a string if put in quoteslist = [1,2,"1",2.2] list can store many vairables even other lists they are always enclosed in square bracketstupple = (1,2,3) they are like lists but they are enclosed in round bracketsprint ( " Type Anything In Double Quotes " , " Use comma to print more than one argument " , " Use \n to go to the next line " ) print ( " print automatically goes to the next line " , " Python is case sensitive so always remember the case ") print("The extra spaces are not necessary for the code " , integer , float , string , list , tupple , "Never put variables in quotes") print("There are ") in an if statement always use defined variables else it will give an errorthere are no brackets in pythonif integer == 1:
always put 4 spaces after an if , for , while statementlearn the operators from the attached screenshotuse input to take inputa = input('Input only accepts 1 argument : ') #the default variable type of inpu is string use int() to convert to integeruse float() to convert to floatuse list() to convert to listuse str() to convert to string` |
if you want to contribute programs related to these things you can fork and contribute |
@rahulhgdev I can add python programs such as factorial of a number, program for simple interest, compound interest, armstrong number, area of circle, prime number. |
Yes, you can contribute 👍 |
@rahulhgdev Please check my PR #5 . |
The text was updated successfully, but these errors were encountered: