Skip to content

Instantly share code, notes, and snippets.

View under-script's full-sized avatar
💭
I may be slow to respond.

Yunusov Abdulmajid under-script

💭
I may be slow to respond.
View GitHub Profile
#For Loop with Lists
fruits = ["Apple", "Peach", "Pear"]
for fruit in fruits:
print(fruit)
print(fruit + " Pie")
print(fruits)
@under-script
under-script / 42. Random Module.py
Last active April 1, 2024 08:34
Day 4 - Beginner - Randomisation and Python Lists
import random
randomInteger = random.randint(1, 10)
print(randomInteger)
randomFloat = random.random() * 5
print(randomFloat)
love_score = random.randint(1, 100)
print(f"Your love score is {love_score}")
@under-script
under-script / 30. Control Flow with if | else and Conditional Operators.py
Last active March 31, 2024 13:16
Day 3 - Beginner - Control Flow and Logical Operators
print("Welcome to the rollercoaster!")
height = int(input("What is your height in cm? "))
if height >= 120:
print("You can ride the rollercoaster!")
else:
print("Sorry, you have to grow taller before you can ride. ")
@under-script
under-script / 19. Python Primitive Data Types.py
Last active March 31, 2024 13:09
Day 2 - Beginner - Understanding Data Types and How to Manipulate Strings
#Data Types
#String
"Hello"[4]
print("123" + "345")
#Integer
@under-script
under-script / 06. Printing to the Console in Python.py
Last active March 31, 2024 13:13
Day 1 - Beginner - Working with Variables in Python to Manage Data
print("Hello World!")