jagomart
digital resources
picture1_Python Projects Pdf 189937 | Cheat Sheet Tunring Scratch Into Python A3 Digital


 149x       Filetype PDF       File size 0.66 MB       Source: ugc.futurelearn.com


File: Python Projects Pdf 189937 | Cheat Sheet Tunring Scratch Into Python A3 Digital
cheat sheet turning scratch into python try out your new text based programming skills with these awesome python projects rpf io startpython input lists ask which card did you pick ...

icon picture PDF Filetype PDF | Posted on 03 Feb 2023 | 2 years ago
Partial capture of text on file.
                               Cheat sheet: turning Scratch into Python
                               Try out your new text-based programming skills with these 
                               awesome Python projects: rpf.io/startpython
          INPUT                                                                                                                                                             LISTS
                                      ask   Which card did you pick? and wait              card = input('Which card did you pick?')                                                                          hand
                                                                                                                                                                                                         1                                            hand = ['ace', 
                                      set   card    to answer                                                                                                                                            2                                                        'king', 
                                                                                                                                                                                                         3                                                        'queen', 
                                                                                                                                                                                                         4                                                        'jack', 
          OUTPUT                                                                                                                                                                                         5                                                        'ten']
                                      say Hello World!                                     print('Hello World!')
                                      say     foo                                          print(foo)                                                                                                       length: 5
          SELECTION                                                                                                                                                                                      add nine to hand                             hand.append('nine')
                                     if      foo  >10 then                                 if foo > 10:                                                                                                           1          hand                     hand.pop(0)
                                                                                                                                                                                                        delete          of
                                        say foo is greater than 10                             print("foo is greater than 10")
                                     else                                                  elif foo < 10:
                                        if      foo  <10 then                                  print("foo is less than 10")                                                 LOOPS
                                                                                           else:
                                           say foo is less than 10                             print("foo is equal to 10")
                                        else                                                                                                                                                            forever                                       while True:
                                           say foo is equal to 10                                                                                                                                                                                         foo += 1
                                                                                                                                                                                                            change foo         by 1
          VARIABLES
                                                                                                                                                                                                        repeatuntil      foo   > 10                   while not foo > 10:
                                                                                                                                                                                                           say    foo                                     print(foo)
                                      set      foo       to 10                             foo = 10
                                               bar                                         bar = "some text"
                                      set                to some text
                                                                                                                                                                                                        repeat 10                                     for i in range(10):
                                                                                           foo = foo + 1                                                                                                    say hello                                     print('hello')
                                      change foo                by 1                       #or
                                                                                           foo += 1
                                                                                                                                                                            CONCATENATION
          RANDOM
                                                                                                                                                                                                        set   foo   to  join hello world              foo = "hello" + "world!"
                                      set  foo   to  pickrandom 1 to 10                     from random import randint
                                                                                            foo = randint(1, 10)
                                                                                                                                                                                                                                               Raspberry Pi Foundation, UK registered charity 1129409
The words contained in this file might help you see if this file matches what you are looking for:

...Cheat sheet turning scratch into python try out your new text based programming skills with these awesome projects rpf io startpython input lists ask which card did you pick and wait hand say hello world print foo length selection add nine to append if then pop delete of is greater than else elif while not set bar some repeat for i in range change by or concatenation random join pickrandom from import randint raspberry pi foundation uk registered charity...

no reviews yet
Please Login to review.