๐๐ธ๐ถ๐ฎ๐น๐ช๐ฐ๐ฎ | โถโโโคโฃ | Research ๐๐ ด๐ ฟ๐ พ๐๐ ธ๐๐ พ๐๐
pวsโฉ sวpoฦ
Hereโs the list of the codes I used along the way.
To Add A Page
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
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
.title() allows the program to accept or recgnise answers typed in small letters