Skip to content

Athenian-Computer-Science/numeric-operations-2-practice-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lesson 2.4 Practice: Numeric Operations 2

Use this repository (repo, for short) to complete your practice for Lesson 2.4.

Complete the following:

Edpuzzle

  • Edpuzzle practice 🪁
    • Use this for practice during the Edpuzzle video. You can use the main window or the Python Console (see button at the bottom of the PyCharm window)

ReadingBat

Fix & Write Code

  • Fix the Code #1 🪁
    • Fix the code so it collects a decimal number from the user and rounds it to the hundredths place. (Note: the round function will not add decimal places!)
      • Example:
        • Input: 6.001
        • Output: 6.00
      • Example 2:
        • Input: 5.672
        • Output: 5.67
      • GitHub will test your solution when you submit. See the instructions at the end of this page.
  • Write Code #1 🚁
    • Collect two numbers from the user.
    • Use the absolute value function to find the positive difference between the two numbers.
    • Print a message to the user with the result.
      • Example:
      number1: 5
      number2: 10
      Output: The difference is 5.
      
  • Fix the Code #2 🪁
    • This program should find the integer quotient and the remainder when two numbers are divided.
    • Prompt the user for two integers.
    • Use the floor division operator and the modulo operator to find both parts of the result.
    • Print a message to the user with the answer.
      • Expected output (for inputs 15 and 2): The quotient is 7 and the remainder is 1.
    • GitHub will run a test on this when you submit it.

Submitting your Repo

  • When you have completed each

Attribution:

Thank you to Bianca Ruiz @RuiztheRuler for providing a great starting place for automating feedback!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages