Sumit Kumar’s Post

We've established the principles of state, primitives, and type integrity. Now, you will apply them. #ZeroToFullStackAI Day 4/135: The First Challenge. Theory is useless without application. For the past three days, we have built the foundation. Today, you will build on it. Your brief is to build a "Simple Revenue Calculator." This will test your grasp of: State: Storing data in variables. Primitives: Using the correct int, float, and str types. Type Integrity: Handling the TypeError that will absolutely break your code if you are not careful. The Challenge Requirements: Ask the user for "Units Sold" (it will be a str). Ask the user for "Price Per Unit" (it will also be a str). Correctly convert these inputs to the right numeric types (int for units, float for price). Calculate the total_revenue (Units * Price). Print a clean, formatted f-string: Total Revenue: ₹1,250.50 This is a direct test of Day 3's "Type Integrity" principle. Post your complete solution code in the comments. 👇 I will review the submissions and post my own production-ready solution tomorrow. #Python #DataScience #SoftwareEngineering #AI #Developer #Challenge

  • text

To view or add a comment, sign in

Explore content categories