Vajad kellegagi rääkida?
Küsi julgelt abi LasteAbi
Logi sisse

Pykkari mõningad vajaminevad koodid. (0)

1 Hindamata
Punktid
Malelaud
from pykkar import *
a=0
sein=0
create_world('''
#############
#> #
# #
# #
# #
# #
#############
''')
while True:
step ()
a+=1
if a%2==1:
paint ()
if is_wall():
sein+=1
if sein%2==1:
right()
if not is_wall():
step ()
a+=1
right()
else :
break
if sein%2==0:
a+=1
right()
right()
right()
if not is_wall():
step()
right()
right()
right()
else:
break
if a%2==1:
paint()
KRIIPS
from pykkar import *
def left ():
right()
right()
right()
sein = 0
create_world('''
#############
#> #
# #
# #
# #
# #
#############
''')
while get_direction() != "S":
right()
while True:
paint()
step()
if is_wall():
sein = sein + 1
if sein %2 == 1:
left()
paint()
if is_wall():
break
else:
step()
if is_wall():
break
else:
step()
left()
if sein %2 == 0:
right()
paint()
if is_wall():
break
else:
step()
if is_wall():
break
else:
step()
right()
Otsimine
from pykkar import *
create_world('''
#############
#> #
# 1 #
# #
# #
# #
# #
#############
''')
sein = 0
def nurka():
while get_direction() != "N":
right()
while not is_wall():
step()
right()
right()
right()
while not is_wall():
step()
while True:
step()
if is_wall():
sein+=1
if sein%2==1:
right()
if is_cone():
take()
nurka()
right()
right()
step()
right()
right()
put()
break
if not is_wall():
step()
right()
else:
break
if sein%2==0:
right()
right()
right()
if is_cone():
take()
nurka()
right()
right()
step()
right()
right()
put()
break
if not is_wall():
step()
right()
right()
right()
else:
break
if is_cone():
take()
nurka()
right()
right()
step()
right()
right()
put()
break
Vasakule Paremale
Pykkari mõningad vajaminevad koodid #1 Pykkari mõningad vajaminevad koodid #2 Pykkari mõningad vajaminevad koodid #3 Pykkari mõningad vajaminevad koodid #4 Pykkari mõningad vajaminevad koodid #5
Punktid 50 punkti Autor soovib selle materjali allalaadimise eest saada 50 punkti.
Leheküljed ~ 5 lehte Lehekülgede arv dokumendis
Aeg2016-05-25 Kuupäev, millal dokument üles laeti
Allalaadimisi 13 laadimist Kokku alla laetud
Kommentaarid 0 arvamust Teiste kasutajate poolt lisatud kommentaarid
Autor Pelmeen96 Õppematerjali autor

Sarnased õppematerjalid

Programmeerimise kodutööd
21
docx

Programmeerimise kodutööd

def protsendiArvutus(arv, protsent): return (arv / 100) * protsent if(isaBruto <= maksuvabaMiinimum): isaPalk = isaBruto else: isaPalk = isaBruto - protsendiArvutus(isaBruto - maksuvabaMiinimum, tulumaksuProtsent) if(emaBruto <= maksuvabaMiinimum): emaPalk = emaBruto else: emaPalk = emaBruto - protsendiArvutus(emaBruto - maksuvabaMiinimum, tulumaksuProtsent) sissetulek = isaPalk + emaPalk + lapsi * lapsetoetus print(round(sissetulek, 2)) 4. Liigu nurka Kirjuta Pykkari programm, mis suvalise ristkülikukujulise maailma puhul liigutab Pykkari kirdenurka (NE). Programm võib eeldada, et robot vaatab alguses lõunasse, aga tema algne asukoht võib olla suvaline. Programmi lõpuks peab Pykkar olema näoga põhjasuunas. import random import pykkar minLaius = 7 maxLaius = 15 minPikkus = 7 maxPikkus = 15 maailmaLaius = random.randint(minLaius, maxLaius) maailmaPikkus = random.randint(minPikkus, minPikkus) pykkarX = random.randint(0, maailmaLaius - 2)

Programmeerimine - python
Mõtteterad aforismid
1
doc

Mõtteterad(aforismid)

Love/craving/sad *True love doesn't consist of holding hands; it consists of holding hearts! *Like millions of dreams came true. Me and you! *We could be friends.. but I'd rather be your lover! *Like shooting stars we shine and then we fade. *It's not hard to see through all that's fake... *And every night he kisses someone new. Never you. *Use me, I'm beautiful take me, I'm yours *Oh darling, you're a million ways to be cruel. * And if I could hold on Through the tears and the laughter Would it be beautiful? Or just a beautiful disaster *"You don't love a woman because she is beautiful, but she is beautiful because you love her." *"Too many people are looking for the right person, instead of being the right person." *Words are only words, can you show me something else? *I don't wish to be everything to everyone, but I would like to be something to someone. *Tears have turned to ice. *How can you break my fucking heart and tell me you still love me? *|I don't like to be alone in the

Inglise keel
Kodutöö 1 BST
5
docx

Kodutöö 1 BST

#include #include #include int TudengiMatriklinumber = 93912; using namespace std; // BST - Binary Search Tree // http://en.wikipedia.org/wiki/Binary_search_tree // Täisarvude otsimise kahendpuu koosneb dünaamilisse mällu paigutatavatest // omavahel viitadega seotud tippudest: struct node { int value; int kordsus; node *left, *right; node( int uus) { value = uus; kordsus = 1; left = NULL; right = NULL; } void insert( int v ) { if(v == value) { kordsus++; } else if ( v < value ) { if( left == NULL) { node *uus = new node(v); left = uus; } else left->insert(v); } if ( v > value ) { if( right == NULL) { node *uus = new node(v); right = uus; } else right -> insert(v); } } int search( int v ) { if(value

Keel c ja objektorienteeritud programmeerimine
Kodutöö 1 BST
5
docx

Kodutöö 1 BST

#include #include #include int TudengiMatriklinumber = 93912; using namespace std; // BST - Binary Search Tree // http://en.wikipedia.org/wiki/Binary_search_tree // Täisarvude otsimise kahendpuu koosneb dünaamilisse mällu paigutatavatest // omavahel viitadega seotud tippudest: struct node { int value; int kordsus; node *left, *right; node( int uus) { value = uus; kordsus = 1; left = NULL; right = NULL; } void insert( int v ) { if(v == value) { kordsus++; } else if ( v < value ) { if( left == NULL) { node *uus = new node(v); left = uus; } else left->insert(v); } if ( v > value ) { if( right == NULL) { node *uus = new node(v); right = uus; } else right -> insert(v); } } int search( int v ) { if(value

Programmeerimine
The whole manager-referaat
3
docx

"The whole manager" referaat

Introduction This inspirational and easy-to-read guide will make every manager stop and think again about how they approach their jobs. It provides practical advice on how to be prioritized and focused on the key tasks, how to manage in the organization; how to delegate effectively, and how to manage the balance between your work, family and personal needs. Managing yourself Book begins with a basic question: How can you possibly hope to manage your unit, team, organisation or company if you can not manage yourself? Six P-s are poor preparation produces piddling poor performance. Most managers appreciate a certain need for preparation but do not give it nearly as much attention as it deserves. Preparation is vital because it will give you considerable selfconfidence right from the start. To get the best out of yourself you need to feel accountable for your actions and for those of your team. Basically, that means not leaning on others for help and not looking for excuses when things go

Inglise keel
Kitarrikursus algajatele 1osa-Ben Edwards
10
doc

Kitarrikursus algajatele 1osa-Ben Edwards

6 Part Beginners Guitar Course - Part One A FREE Mini Course Brought to You by Jamorama ­ The Ultimate Guitar Learning Kit YOU HAVE CONFIRMED YOUR SUBSCRIPTION TO THE JAMORAMA NEWSLETTER AND THE FREE 6 PART GUITAR MINI COURSE! Hi there and welcome to Part One of the Beginners Mini- Course on Learning How to Play the Guitar. This mini- course gives you a taste of what's covered in Jamorama - The Ultimate Guitar Learning Kit! Ben Edwards - In this course you will learn powerful tips and skills to get you Creator of playing the guitar with the fluency and accuracy of a Jamorama professional, and by the end of it you will be able to play a full song by yourself. In my mini-course, this is what you'll learn: Part One--Introduction to the Guitar and How to Play Chords · Getting into Position. Information that every beginner should know be

Muusika
The Development of Reese Hoffa
9
pdf

The Development of Reese Hoffa

The Development of Reese Hoffa & Training Scheme for 2007 Season Reese Hoffa Development Table 1998 19.07m 1999 19.36m 2000 19.79m 2001 20.22m 2002 20.47m 2003 20.95m 2004 21.67m 2005 21.74m 2006 22.11m 2007 22.43m Hoffa Performance Progression Reese Hoffa Performance Progression 23 22 21 Distance (m) 20 19 18 17 16 Year 2001 2002 2003 2004 2005 2006 2007 1 Reese Hoffa Physical & Lifting Parameters 1998 1999 200

Inglise keel
Cashflow Quadrant
4
docx

Cashflow Quadrant

Katre Semjonov Cashflow Quadrant I chose a book named "Cashflow Quadrant" written by Robert T. Kiyosaki. This book is written for people who are ready to change quadrants. This book is especially for individuals who are employees or self-employed and are contemplating becoming business owners or investors. It is for people who are ready to move beyond job security and begin to achieve financial security. It is not an easy life's path but the prize at the end of the journey is worth the journey. It is the journey to financial freedom. WHICH QUADRANT ARE YOU IN? IS IT THE RIGHT ONE FOR YOU? Are you financially free? The CASHFLOW Quadrant was written for you if your life has come to a financial fork in the road. If you want to take control of what you do today in order to

Ökoloogia ja keskkonnakaitse1




Kommentaarid (0)

Kommentaarid sellele materjalile puuduvad. Ole esimene ja kommenteeri



Sellel veebilehel kasutatakse küpsiseid. Kasutamist jätkates nõustute küpsiste ja veebilehe üldtingimustega Nõustun