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

Coding Cheat Sheets Python HTML Luau

The document contains coding cheat sheets for Python, HTML, and Luau (Roblox). Each section includes basic syntax examples for variables, functions, conditions, loops, and other essential programming concepts. It serves as a quick reference guide for beginners and intermediate programmers.

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 views2 pages

Coding Cheat Sheets Python HTML Luau

The document contains coding cheat sheets for Python, HTML, and Luau (Roblox). Each section includes basic syntax examples for variables, functions, conditions, loops, and other essential programming concepts. It serves as a quick reference guide for beginners and intermediate programmers.

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

■ Python Cheat Sheet

print("Hello World")

# Variables
name = "Yahya"
age = 14
height = 5.6
is_student = True

# Operators
+ - * / // % **

# Conditions
if age > 18:
print("Adult")
elif age == 18:
print("Exactly 18")
else:
print("Minor")

# Loops
for i in range(5):
print(i)

while age < 18:


age += 1

# Lists
numbers = [1, 2, 3]
[Link](4)
[Link](2)

# Dictionary
student = {"name": "Yahya", "grade": 8}

# Functions
def greet(name):
return "Hello " + name

■ HTML Cheat Sheet

<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
</head>
<body>

<h1>Hello World</h1>
<p>This is a paragraph.</p>

<a href="[Link]
<img src="[Link]" alt="Image">

<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>

</body>
</html>

■ Luau (Roblox) Cheat Sheet

print("Hello Roblox")

-- Variables
local name = "Player"
local score = 0

-- Function
local function greet(playerName)
return "Hello " .. playerName
end

-- If Statement
if score > 10 then
print("Winner!")
else
print("Keep trying!")
end

-- Loop
for i = 1, 5 do
print(i)
end

-- Accessing Parts
local part = [Link]
[Link] = [Link]("Bright red")

You might also like