Jump to content

Recommended Posts

Posted

salut je ne comprends pas pq mon programme compte qu'une fois les dominos et j'ai réussi à rectifier mais ça me fais 36 block de plus.

```

from robot import *
nbrCa=0
nbrE=0
nbrCr=0
for loop in range(8): 
    avancer() 
    if surCarre() and surCroix(): 
        nbrCa=nbrCa+1
        nbrCr=nbrCr+1
    if surCarre() and surEtoile(): 
        nbrCa=nbrCa+1 
        nbrE=nbrE+1 
    if surCarre and surCarre: 
        nbrCa=nbrCa+2 
    if surEtoile() and surEtoile(): 
        nbrE=nbrE+2 
    if surEtoile() and surCroix(): 
        nbrE=nbrE+1 
        nbrCr=nbrCr+1 
    if surCroix() and surCroix(): 
        nbrCr=nbrCr+2 
avancer() 
avancer() 
if nbrCa > (nbrE and nbrCr): 
    ecrireNombre(nbrCa) 
if nbrCr >(nbrE and nbrCa): 
    ecrireNombre(nbrCr) 
if nbrE >(nbrCa and nbrCr): 
    ecrireNombre(nbrE) ```

celui la c'est celui qui à 36 block de plus normalement il fonctionne mais du coup il a trop de block de plus 

https://ibb.co/kVXdp7gH

https://ibb.co/z3xC7pg

Merciii

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...