Skip to content

semencotan/ice-cream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

ice-cream

class IceCream: def init(self, flavor, topping, price): self.flavor = flavor self.topping = topping self.price = price

def display_info(self):
    print(f"Ice Cream: {self.flavor}")
    print(f"Topping: {self.topping}")
    print(f"Price: ${self.price}")

Example usage

if name == "main": # Creating an instance of the IceCream class my_ice_cream = IceCream(flavor="Vanilla", topping="Sprinkles", price=3.50)

# Displaying information about the ice cream
my_ice_cream.display_info()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published