Dive Board



Gym Membership Manager - Python Coding Challenge

Gym Membership Manager - Python Coding Challenge

by Randyarvelo on Aug 22nd, 2023 13:56 PM

[color=#374151][size=3][font=Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"][color=var(--tw-prose-bold)]Question:[/color]
Hello coding community! I've got an exciting coding challenge that revolves around a gym membership management system tailored to my bodybuilding and tanning business. If you're up for the challenge, let's dive in![/font][/size][/color]
[color=#374151][size=3][font=Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"][color=var(--tw-prose-bold)]Challenge Overview:[/color][/font][/size][/color]
[color=#374151][size=3][font=Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"]Imagine you're building a Python program to manage gym memberships, track member details, and calculate membership fees for our bodybuilding business. Your task is to create a
[/font][/size][/color]

Member

[color][size][font]
class that encapsulates this functionality.[/font][/size][/color]
[color=#374151][size=3][font=Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"][color=var(--tw-prose-bold)]Requirements:[/color][/font][/size][/color]
[ol]
[li][left][color=var(--tw-prose-bold)]Member Class:[/color] Create a
Member

class with the following attributes:
[ul]
[li]
id

: A unique identifier for each member.[/li]
[li]
name

: The member's full name.[/li]
[li]
age

: The member's age.[/li]
[li]
membership_type

: The type of membership (e.g., "Basic", "Premium", "VIP").[/li]
[/ul]
[/left]
[/li]

[li][left][color=var(--tw-prose-bold)]Membership Fee Calculation:[/color] Implement a method within the
Member

class that calculates the monthly membership fee based on the following rules:
[ul]
[li]Basic: $30 per month.[/li]
[li]Premium: $50 per month.[/li]
[li]VIP: $100 per month.[/li]
[/ul]
[/left]
[/li]

[li][left][color=var(--tw-prose-bold)]Membership Management System:[/color] Develop a function or class that manages the gym's member database. This should include the ability to:
[ul]
[li]Add new members to the database.[/li]
[li]Display member details.[/li]
[li]Calculate and display the total membership fees for all members.[/li]
[/ul]
[/left]
[/li]

[li][left][color=var(--tw-prose-bold)]Sample Usage:[/color] Illustrate how your code can be used with a few sample member entries and function calls.[/left]
[/li]

[/ol]
[color=#374151][size=3][font=Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"][color=var(--tw-prose-bold)]Submission:[/color][/font][/size][/color]
[color=#374151][size=3][font=Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"]When you're ready, share your well-structured and commented code along with explanations of your approach. We're excited to see your coding skills in action![/font][/size][/color]
[color=#374151][size=3][font=Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"]Let's work together to flex our coding muscles and create an efficient gym membership manager for our bodybuilding business. Looking forward to your solutions![/font][/size][/color]

Randyarvelo

Posts: 3

Joined: 17.08.2023


STATISTICS


Total posts: 165824


Total topics: 40229


Total members: 43975


Newest member: Daniel G.