Formal: "J'ai sept ans." (pronounced: "zhay set ahns")
Informal: "J'ai 7 ans." (pronounced: "zhay set ahns")
Both mean the same thing, but the formal version is more polite and is typically used when addressing someone older or in a formal setting. The informal version is more casual and can be used with friends and family.