- This event has passed.
10 AM – Intro To Python – Gamas
June 6 @ 10:00 am - 11:00 am
Today We Did
- We continued reviewing homework from page 20 to 23.
- We did a lot of exercises how to insert variables in the text using the “f” String format function.
- We learned “\t” will give some spaces, “\n” will give new lines.
Homework
- Create june_6_string_hw_3.py.
- Copy below codes into the file and then add more codes according to the instruction
-
name_1 = "eliZaBeth" name_2 = "arThUr" """ INSTRUCTION 1 write code that will print "ARTHUR is Elizabeth's brother." use f format. """ print("ANSWER 1") """ INSTRUCTION 2 write code that will print below (3 lines output). It has to be one print statement. You have to use \n. If you don't know how to do this look at example in page 22 Elizabeth Arthur are siblings. """ print("\nANSWER 2") """ INSTRUCTION 3 print "toy story" using movie variable below. You need to strip the white spaces using strip() function. Look at page page 23 for example on how to use strip(). """ print("\nANSWER 3") movie = " toy story. "