Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

intermediate commands

No description
by

Eunice Cheung

on 20 December 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of intermediate commands

intermediate commands
design by Dóri Sirály for Prezi
basics
first you must know how to use the if, else, print commands and know what a variable is.
advanced print
print commands can also take and print variables or both:

snum=2
num=5
print"I'm #",num
^
print snum,num
^
for loops (no not 4 loops)
a for loop is a way of repeating something many times by using a built in variable:

for j in range(0,6):
^
print"hi"
print j
^
while
while loops are good for games because they play until pl1 gets 5 points but as always here is how it works:

j=0
while j<5:
j=j+1
print j
input and raw_input
no you do not input a raw steak and it gives you back a cooked one. inputs and raw input take your opinion in to account like this:

print input("enter your favorite number: ")
print raw_input("enter your favorite word")
that program would run like this:

I'm # 5
^
2 5
^
that program would end up like this:

hi
0
hi
1
hi
2
hi
3
hi
4
hi
5
notice it ends at five not six
ends up like this

1
2
3
4
5
Yay we've
finished
runs like so:

enter your favorite number: 5
(I entered that five)
5
enter your favorite word: boo
(I also entered that "boo")
boo
Full transcript