This is getting tense
This is getting tense
This is an overview of the basics to help you boost your start with python. I won't go through everything of course but enough for you to start your first application. Make sure you selected Python 3 instead of Python 2.
Variables in python are just like the ones in math but you have to define them. You can store different types of data like the ones below...
Booleans - True/False
Int/Integer - Numbers with no decimal
Double - Decimals
Long - Big Number
Short - Small Number
This is how we define each one
var myBoolean = True var myString = "A String" var myInt= -34 var myDouble= 43.143 var myShort = 10 var myLong =34123 var myByte = 2
The variable names are in the middle which you will need to call it... and you can name the variables anything without any special characters(!, +, #, etc)
Note: True/False in booleans MUST be capitalized
Operators is math. Done! Ok, here are the different types...
Addition - +(It adds stuff)
Subtraction- - (It subtracts stuff)
Multiplication- is the star above the 8 key (It multiplies stuff)
Division- / (It divides stuff)
*Modulus- % (It finds the remainder of an equation)
Here is the syntax
var mathNumber = 42 var password = 1234 var addition = mathNumber+password print(password%mathNumber)
As you can see my very AP math skills
The print statement is a very simple concept, all it does is display text in the terminal/console. In replit, you should see your program running on the side. Below is the syntax of the code for printing.
Whatever is in the quotes is printed so you can change it to "Creeper Aww Man" and it would work. We can also print variables like this (only if we have it defined)...
To print variables along strings you can do...
print("My Name is" + name)
Say you want to print What is your Name? and then print the user's name. To do this you would need to tell the computer you are getting there input.
name = input("What is your name?")
The code here makes a variable which you can use later to print or do something.
Note: the thing before the = sign is your variable name for pulling the data later.
What do we do when we want to check if data is equal to something... well if statements. This is the syntax to make if statements are...
if(age > 60): print("Sign Up for our senior program) else if(age == 9): print("Greetings 9-year-old") else: print("Hello"+age+"year-old")
Note: Indentations (press tab key, NO SPACES) are REALLY important for the syntax. If it is wrong you program will crash. This is only when the line before has ":" which means it continues to the next line so you need to indent the things you want to execute when that statement is true.
This is a very small part of the programming world but I found some tutorials I think would help you out with your python coding.
If you want to make games on the web I would recommend learning HTML/CSS and then start learning JS when you are confident with both HTML/CSS. After you are done learning JS I would suggest looking into Canvas Games (Google It) which there are a ton of tutorials for. This is the easiest way to game development. This can get you into game development in about a month or so if you are really dedicated.
This genre is a bit complicated because of the variety of choices. You can do Python which is the easiest of which. But after you are thorough with the fundamentals, basics, and intermediate level programming, I recommend starting with PyGame which is a programming library(Existing Code that you can build upon) that helps you make games. Then they are harder languages for this like Java(Which Minecraft is made in) and C++(Which pretty much all games are made in). Remember this genre will take a year or so to master.
I recommend you to use an Apple device for this one, although possible in windows. This uses a programming language called Swift. This is made by apple and there are a ton of tutorials. The syntax is very similar to Java and C++ which I rather recommend you learn one of those before you go onto Swift.
The Google play store uses Java just like Desktop/Pc Games and learning this language you can do two genres in one go.
This is the path that I recommend, learn Unity which uses C#(Not to be confused with C++), for this learning C# is not necessary but recommended and search online for some Unity tutorials. The great part about this is that it will take a couple of months to master and this can be used for Websites, Xbox, Pc, Apple App Store, Google Play, Facebook Game Room, and much more. This is the most popular of which but it can be confusing at first so I recommend getting some programming experience before hopping on to this.
Good Luck with your game development and If this helps your question please select the checkmark next to this comment.
I am going to assume that you are trying to make a title as in a heading. What the title tag is not to make titles but to title the website which appears on the tab. To make a heading you need to do this
<html> <head> <title> HELLO WORLD!</title> </head> <body> <h1>Hello World </h1> </body> </html>
Whatever you put in the body is the content of your website. And the H1 stands for heading 1. There are 6 levels of heading, h1 being the biggest and h6 being the smallest.
<h1>Hello World</h1> <h2>Hello World</h2> <h3>Hello World</h3> <h4>Hello World</h4> <h5>Hello World</h5> <h6>Hello World</h6>
FYI: to add pargraphs which is achieved by doing html <p>CONTENT HERE</p>
I hope I was able to help if so select the checkmark next to my comment which would be greatly appreciated.
Currently, the default libraries prevent you to automate the user's keyboard or mouse. Although this might be helpful, it guides you through the basics and eventually leads your question in chapter 18.
I hope that is helpful and good luck with your project. If this helps you I would appreciate if you would select this as the correct answer.
@kiki2005 then you have some minor errors but I fixed it for you... I recommend to compare and contrast both and implement better syntax next time
global character print("Welcome to Password Checker") def menu(): print("Please enter a number that fits with one of the below.") print("1: Password Checker") print("2: Password Generator") print("3: Quit") menuSelection = int(input("...")) if menuSelection == 1: password = input("please enter a password") for c in password : if c.isspace() != True: character=0 character = character + 1 if character<=8: print ("this password is too short") if character>=24: print("this password is too long") else: point = 0 length = len(password) uppers = [x for x in password if x.isupper()] uppernum = len(uppers) lowers = [x for x in password if x.islower()] lowernum = len(lowers) point = point + length + (uppernum * 5) + (lowernum * 5) print(point)
Hopeflly he isnt hacking the people signed in with google cuz then he will have access to everything
I would buy a water bottle.
I mean a "non biased" $5k challenge.
I would say there is no such thing as learning a programming language fully. Even "experts" learn from a day to day basis and there are constantly new features and libraries to explore. By that you are meaning the fundlementals it really depends on how dedicated you are. It could be one day or one year. And your struggles right now will be the way you get better at programming :)