Extended Assignments - Variables and String Formatting
Practice Python to improve your typing and coding skills. Use VS Code and create the files below. Run each program and check the output.
Extend the fruit description by adding more variables to describe the fruit in greater detail.
fruit_size = "medium")origin_country = "India")best_season = "summer")taste_profile = "sweet and tangy")aroma = "fragrant")vitamin_c_mg = 28.5)calories_per_100g = 52)sugar_g = 12.2)fiber_g = 2.4)is_rare = false)popularity_rating = 9.5)used_in_festivals = true)days_since_harvest = 3organic_certified = trueallergy_warning = "None"Be creative and make your fruit description as detailed and interesting as possible!
Display your fruit variables in a structured way using formatted strings (f-strings).
\n) to separate sectionsCreate variables and use f-strings to make a student biography and a short story.
Now, try creating your own:
Bonus: Try adding more variables (like friends, favorite food, or a twist in the story).
Post in the group with any of these problems:
Good luck and have fun coding!