Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9ad17fb

Browse files
inventory checking
1 parent cc914c5 commit 9ad17fb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
def in_stock(f):
2+
inventory = {"apple":25,"mango":300,"peer":500,"orange":1000}
3+
if f in inventory:
4+
return f"This fruit is in Stock! Here is how many : {inventory[f]}"
5+
6+
return f"This fruit is not in Stock"
7+
8+
def main():
9+
fruit = input("033円[1;3mEnter a fruit : 033円[0m")
10+
print(in_stock(fruit))
11+
12+
if __name__ == "__main__":
13+
main()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /