Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
skifli
Reaction score
62

Profile posts Latest activity Postings About Badges

  • Nice seeing you again :)
    skifli
    skifli
    Hey, thanks. How have things been? Also, does CodeForum not have a Discord server anymore or am I really bad at finding the link?
    Malcolm
    Malcolm
    Things have been good! How have things been with you?

    We got rid of Discord maybe a year ago.
    skifli
    skifli
    They've been alright here. I had a bit of a break from coding for a few months because I've had a lot of exams and revision, and I still do, but I've come back to coding some more now. I also do a STEM project in school called F1 in Schools, so that's been taking a lot of my time.
    Please give me something to code in Python.
    Malcolm
    Malcolm
    Hmm I know it’s like reinventing the wheel but what about a calculator which calculates your age in dog or cat years?
    skifli
    skifli
    Python:
    age = int(input("Enter your age: "))
    
    print(f"You are {age * 7} dog year(s) old.\nYou are {15 if age == 1 else 24 if age == 2 else 24 + (age - 2) * 4} cat year(s) old.")

    According to https://www.almanac.com/cat-age-chart-cat-years-human-years for cats and that 1 human year equals 7 dog years.
    Malcolm
    Malcolm
    Well done!
    • Like
    Reactions: skifli
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Back
Top Bottom