American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

1 PM – Intro To Python

June 20, 2020 @ 1:00 pm - 2:00 pm

  1. Homework:
    1. Page 138
    2. Create a function with return value, “convert_kg_to_gram”
      1. It has one parameter: “kg”
      2. Inside the function it will return the value of 1 Kilogram from the parameter into gram. There are 1000 gram in 1 Kilogram.
      3. Return the value.
      4. Get input from user “Enter number of Kilogram: “
      5. Whatever user enter, pass to the “convert_kg_to_g” function
      6. Call the function, get the result and print the result to the screen
      7. If you code correctly, you should be getting something like this in the shell.
      8. Enter number of Kilogram: 1
        There are 1000 grams in 1 kilograms.
        
        Enter number of Kilogram: 2
        There are 2000 grams in 2 kilograms.

Details

Date:
June 20, 2020
Time:
1:00 pm - 2:00 pm
Event Categories:
,