logotransparent.png

Legion of Learners

www.lol-101.com

  • Home

  • Classrooms

  • Courses

  • About Us

    • Executive Team
    • Board Members
  • Resources

  • More

    Use tab to navigate through the menu items.
    To see this working, head to your live site.
    • Categories
    • All Posts
    • My Posts
    Shravya S
    Oct 01, 2021
      ·  Edited: Oct 01, 2021

    9/28 - Class 3 HW + Resources

    in Introduction to Python

    RESOURCES:

    Class slides: https://docs.google.com/presentation/d/1iPT_gnG2iSXXjWj2tE6gbsdg4V0Sy8rY08SC5SoB9CA/edit?usp=sharing

    Example code: https://replit.com/@ShravyaS/IntrotoPython-3

    (No bullet notes this week.)


    HOMEWORK:

    Write code to take in two integers: the first represents feet and the second is inches of someone’s height (like 5 feet 4 inches). Print out what the height is in feet with decimal points, then print out what the height is in meters.

    Write your answer as a comment, and we’ll post the solution by next class. See you then!


    Note: VIP students, please contact us (Eric and I) about office hours!

    4 comments
    0
    Sanjeet Sathish
    Oct 02, 2021

    print('feet') f = float(input()) print('inches') i = float(input()) if i == 12: print(f+1) elif i > 9: print(f+(i/100)) elif i < 10: print(f+(i/10)) print((f+i)/3.281, 'meters')

    0
    jliu.mky
    Oct 03, 2021

    print('Please input the feet of height'); f_height = int(input()); print('Please input the inch of height'); i_height = int(input()); print('The height is', f_height,'feet and',i_height,'inch'); total_feet = f_height + i_height/12; print("The height in feet is", total_feet, "feet"); total_meter = total_feet * 0.3048; print("The height in meter is", total_meter, "meter");

    0
    athenawang0406
    Oct 04, 2021

    print("A Silver Arowana fish is 3 feet and 3 inches, in feet, it's") v = int(3 / 1) print(v, "and") x = float(3 / 12) print(x, "feet")

    0
    Eric Wu
    Oct 05, 2021

    Solutions:

    feet = int(input("How many feet tall are you?")) inches = int(input("How many inches tall are you?")) feet2 = feet + (inches/12) print("You are", feet2, "feet tall!")

    print("You are", (feet2*0.3048), "meters tall!")

    0
    4 comments

    Questions? Email us at legionoflearners@gmail.com or join our WeChat group!

    • lol-101dotcom

    ©2020 Legion of Learners