Strings
Lists
Numbers
Syntax
Random!!
100
The output of: >>> 'something'
What is something
100
Output? >>>a[100, 30, 20] >>>a
What is 100, 30, 20
100
2+2
What is 4
100
What is wrong? (paragraph) def spam(): eggs = 12 return eggs (paragraph) print spam()
What is whitespace
100
Can strings be altered?
No
200
The difference between " ' """
The first and second are interchangeable, the third includes paragraphs
200
Output? >>>a[100, 30, 20] >>>a[2]
What is 20
200
Outcome: >>> 7/3 (hint: Sig fig)
What is 2
200
var = "i hope it snows" print word[1:6:2]
What is hp
200
Not And Or (hint: what am i?)
What is a boolean?
300
The output of: >>> "I heard (paragraph here, yes this website sucks) that..."
What is I heard that
300
Create code for for variable a and with the values 100, 20
What is >>> a[100, 20]
300
>>> (50-5*6)/4
What is 5
300
What is the general code for: when x equals 2 or 5, then print "apple". when x is greater than 5 then "orange". when x is less than or equal to 1, then "pears". The rest of the number produce "lions"
What is if x==2 or x==5: print "apple" elif x>5: print "orange" elif x<=1: print "pears" else: print "lions"
300
>>> #what is my out come?
What is (nothing)
400
What is the outcome? Syntax: >>>word = "myLittlePony" >>>word[1:6]
What is yLittl
400
output? >>>a['green', 'eggs', 'ham'] >>>a[0] * 3
What is greengreengreen
400
>>>x = y = z = 6 >>> x * y
What is 36
400
What is wrong? if x ==2 print "noooooo!!!" else print "yes"
What is ":" after else and 2
400
What two numbers of the string correspond to "h" in variable snow >>> snow = "Hope it snows"
What is -13 and 0
500
len()
the length of the string
500
Double Jeopardy!!! Fill in the syntax: >>> a = ['spam' , 'eggs' , 100 , 1234] >>> ???????? >>> a (outcome is [spam, eggs, 123, 1234])
What is a[2] = a[2] + 23
500
Outcome: >>>1j * 1J
What is (-1+0j)
500
Which is correct: if x==2: print "blah" or if x=2: print "blah"
What is the first, if x==2: print "blah"
500
What is the code to import the library "datetime"
What is (paragraph) from datetime import datetime
M
e
n
u