Skip to content

Instantly share code, notes, and snippets.

View Programmer-RD-AI's full-sized avatar
🎯
Leveling Up

Ranuga Disansa Programmer-RD-AI

🎯
Leveling Up
View GitHub Profile
@Programmer-RD-AI
Programmer-RD-AI / python2pseudo.py
Last active March 31, 2024 06:06 — forked from BlueNexus/python2pseudo.py
Python to Pseudocode converter
import os.path
import re
'''
INSTRUCTIONS
1. Create a file with the following code
2. Put the file you want to convert into the same folder as it, and rename it to "py_file.py"
3. Add a "#F" comment to any lines in the code which have a function call that doesn't assign anything (so no =),
as the program cannot handle these convincingly
4. Run the converter file
@Programmer-RD-AI
Programmer-RD-AI / CracklePop.py
Created January 17, 2025 18:37
Program that prints out the numbers 1 to 100 (inclusive). If the number is divisible by 3, print Crackle instead of the number. If it's divisible by 5, print Pop. If it's divisible by both 3 and 5, print CracklePop.
for num in range(1, 101):
if num % 3 == 0 and num % 5 == 0:
print("CracklePop")
elif num % 5 == 0:
print("Pop")
elif num % 3 == 0:
print("Crackle")