RRecipeMallow
Produk

Fitur program · Batas kelompok resep utuh

01

Bandingkan stok dengan kebutuhan per kelompok sebelum menghubungkan jumlah pembatas ke layar persediaan.

01

Model

Atur endpoint kompatibel OpenAI atau Anthropic dengan URL dasar dan kunci API jika diperlukan. Uji koneksi. Server model lokal harus berjalan; alat jarak jauh dapat mengirim data secara terpisah.

02

Proyek

Pilih folder dan minta asisten membaca berkas terkait sebelum mengeditnya. Tentukan tujuan serta batas tugas.

03

Perubahan

Tinjau perubahan dan keluaran perintah. Jalankan pemeriksaan proyek sebelum menerima hasilnya; kode yang dihasilkan tidak otomatis sudah diuji.

Batas kelompok resep utuh

● ● ●RecipeMallow●
Alur kerja · Batas kelompok resep utuh ×
def recipe_batches(stock, recipe):
    if type(stock) is not list or type(recipe) is not list:
        raise ValueError("lists required")
    if len(stock) != len(recipe) or not 1 <= len(stock) <= 32:
        raise ValueError("matching ingredient counts")
    if any(type(x) is not int or not 0 <= x <= 10**9
           for x in stock + recipe):
        raise ValueError("bounded nonnegative integers")
    limits = [a // b for a, b in zip(stock, recipe) if b]
    if not limits:
        raise ValueError("at least one required ingredient")
    return min(limits)
✳Hitung kelompok utuh dari stok dan resep tetap dengan 1–32 bahan bernilai hingga 10^9.
✓ PerubahanTinjau sebelum menerapkan ↗
Ilustrasi ruang kerja
Ruang kerja kode dengan AI

Ide berikutnya dimulai di sini.

Unduh untuk Windows ↗