What are other sequences that can be used in Python? / Other sequences?

In future weeks, we'll see some other ways to use range(), lists, and even strings.

** how complicated is the coding behind the scenes of python? **

I'm not sure how to answer this. On the one hand, it's very simple, because computers can only follow very simple directions. (They're even worse at understanding directions than I was when you told me how to make a peanut butter and jelly sandwich.) On the other hand, because Python can do things like for loops, those simple directions are used together, often in complicated ways, to achieve many different things. So it is both simple and complicated!

What else can we do with for loops? / What is the practical application of for loops?

So much! We'll use for loops in our programs for the rest of the semester; it turns out to be very useful to be able to write a short amount of code that gets executed repeatedly.

Can we use for loop to run a series of calculations?

Yes, we'll do this on Friday!

Is def main(): necessary for a program that only contains a for loop?

Writing .py files with the proper syntax for def main(): is a good habit to practice right now, even if our programs are short.

Selective ranges

This was in the reading, but it's not the focus this week.

How do we give an "if" command? (eg. if cake volume is more than 36, ask for user input "Are you sure you want to post this?")

Yes, we'll learn the syntax for writing expressions like this next week.

Can I round to places other than 1's? / Is the only way to round by using int()?

There are several ways to round. The int() function rounds floats to integers. The function round() will round to any place you want, if you give it a second argument which is an (integer) number of places after the decimal.

>>>round(3.14159)
3
>>>round(3.14159,2)
3.14
>>>round(3.14159,3)
3.142

Notice the decimal places are sometimes rounded up.

if for loops can say two things about one item in a sequence e.g. instead of "chocolate is good, vanilla is good" it would say "chocolate is good. chocolate is great, vanilla is good, vanilla is great"

Yes, absolutely! The "body" of the for loop can contain several commands.

for x in ['chocolate', 'ice cream', 'birthday']:
    print(x, 'cake is delicious!')
    print(x, 'cake is great!')

Will produce the output:

chocolate cake is delicious!
chocolate cake is great!
ice cream cake is delicious!
ice cream cake is great!
birthday cake is delicious!
birthday cake is great!