jolly20220861.github.io

Bookmark this site to keep an eye on my learning and progress. Join me in my Software Development adventure.

Follow me on GitHub

Homepage | About | Research πŸ†πŸ…΄πŸ…ΏπŸ…ΎπŸ†‚πŸ…ΈπŸ†ƒπŸ…ΎπŸ†πŸ†ˆ

pǝs∩ sǝpoΖ†

Here’s the list of the codes I used along the way.

To Add A Page

image Week 1 represents the name of the page that you’d like to create

Python Fundamentals Activity

The objective of this task is to practice coding basic Python language syntax and to apply the syntax rules to employ good coding habits for the following fundamentals:

  • Variables
  • User inputs
  • Arithmetic operations
  • Logical operations
  • If.else
  • Loops

Activity 1 Calculate a dog’s age in dog years.

Note: For the first two years, a dog year is equal to 10.5 human years. After that, each dog year equals 4 human years.

Your program should look as follows:

  Input a dog's age in human years: 15
  The dog's age in dog years is  73

Answer Code

image

If the exit() syntax is removed, the prompt to exit will not appear.

Activity 2 Convert a month name to a number of days.

Your program should look as follows:

  Input the name of the month: February
  No. of days: 28/29 days

Answer Code

Homepage | About | Codes Used | Research Repository