American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

10 AM – Intro To Python – Gamas

June 6 @ 10:00 am - 11:00 am

Today We Did
  1. We continued reviewing homework from page 20 to 23.
  2. We did a lot of exercises how to insert variables in the text using the “f” String format function.
  3. We learned “\t” will give some spaces, “\n” will give new lines.
Homework
  1. Create june_6_string_hw_3.py.
  2. Copy below codes into the file and then add more codes according to the instruction
  3. 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.  "

Details

Date:
June 6
Time:
10:00 am - 11:00 am