fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. // your code goes here
  13. }
  14. }
Success #stdin #stdout 0.13s 54704KB
stdin
# Fix encoding issue by removing special characters and using only ASCII
steps = [
    "1. Ask for Input - Question: 'Product ID' (Text)",
    "2. Ask for Input - Question: 'Product Name' (Text)",
    "3. Ask for Input - Question: 'Category' (Text)",
    "4. Ask for Input - Question: 'Quantity' (Number)",
    "5. Ask for Input - Question: 'Price' (Decimal)",
    "6. Text - Format the values into JSON using previous inputs"
]

# Create a base image
img = Image.new('RGB', (1000, 600), color=(255, 255, 255))
draw = ImageDraw.Draw(img)
font = ImageFont.load_default()

draw.text((30, 20), "Example: 'Add Product' Steps in iPhone Shortcuts", fill=(0, 0, 0), font=font)

y = 60
for step in steps:
    draw.rectangle([30, y, 970, y + 50], outline="black", width=2)
    draw.text((40, y + 15), step, fill=(0, 0, 0), font=font)
    y += 60

# Save image
img_path = "/mnt/data/shortcuts_add_product_steps_fixed.png"
img.save(img_path)

img_path
stdout
Standard output is empty