0% found this document useful (0 votes)
7 views4 pages

Explained Coding Cheat Sheets Python HTML Luau-2

The document provides coding cheat sheets for Python, HTML, and Luau (Roblox), covering beginner to advanced concepts. Each section includes code examples and explanations for key programming elements such as printing, variables, conditions, loops, functions, and more. This serves as a quick reference for learners to understand and implement fundamental coding principles.

Uploaded by

yahyayafi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

Explained Coding Cheat Sheets Python HTML Luau-2

The document provides coding cheat sheets for Python, HTML, and Luau (Roblox), covering beginner to advanced concepts. Each section includes code examples and explanations for key programming elements such as printing, variables, conditions, loops, functions, and more. This serves as a quick reference for learners to understand and implement fundamental coding principles.

Uploaded by

yahyayafi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Coding Cheat Sheets with Explanations

From Simple to Advanced – Python • HTML • Luau (Roblox)


■ PYTHON – Beginner to Advanced

1) PRINT (Beginner)
print("Hello World")
Explanation: Displays text on the screen.

2) VARIABLES
name = "Yahya"
age = 14
Explanation: Stores data inside a variable name.

3) CONDITIONS
if age > 18:
print("Adult")
else:
print("Minor")
Explanation: Runs code only if condition is true.

4) LOOPS
for i in range(5):
print(i)
Explanation: Repeats code multiple times.

5) FUNCTIONS (Intermediate)
def greet(name):
return "Hello " + name
Explanation: A reusable block of code.

6) LISTS
numbers = [1,2,3]
[Link](4)
Explanation: Stores multiple values in one variable.

7) CLASSES (Advanced Beginner)


class Player:
def __init__(self, name):
[Link] = name
Explanation: Blueprint to create objects.
■ HTML – Beginner to Advanced

1) BASIC STRUCTURE
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
</head>
<body>
</body>
</html>
Explanation: Structure of every webpage.

2) HEADINGS & PARAGRAPHS


<h1>Hello</h1>
<p>This is text</p>
Explanation: Displays content.

3) LINKS & IMAGES


<a href="[Link]
<img src="[Link]">
Explanation: Adds clickable links and pictures.

4) LISTS
<ul>
<li>Item 1</li>
</ul>
Explanation: Creates bullet lists.

5) FORMS (More Advanced)


<form>
<input type="text">
<button>Submit</button>
</form>
Explanation: Takes user input.
■ LUAU (ROBLOX) – Beginner to Advanced

1) PRINT
print("Hello Roblox")
Explanation: Outputs text in Roblox Studio.

2) VARIABLES
local score = 0
Explanation: Stores player data.

3) CONDITIONS
if score > 10 then
print("Winner")
end
Explanation: Runs when condition is true.

4) LOOPS
for i = 1, 5 do
print(i)
end
Explanation: Repeats code.

5) FUNCTIONS
local function greet(name)
return "Hello " .. name
end
Explanation: Reusable code block.

6) EVENTS (Advanced Beginner)


[Link]:Connect(function(player)
print([Link] .. " joined!")
end)
Explanation: Runs when a player joins the game.

You might also like