Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Coders Lounge › python program i need help

python program i need help

Posts 1–5 of 5 · Page 1 of 1
Darkenforcer22
Darkenforcer22
python program i need help
this is my program so far

End ]
array = []
amount_of_stock_left = []

print("Welcome to Terence's store, we sell the following items : ")
import csv
with open('Productlist task3.csv')as csvfile:
reader = csv.reader(csvfile)
for row in reader:
print(row)
while True:
fileopener=open("Productlist task3.csv")
for line in fileopener:
End.append(line)
fileopener.close()
sum1=len(End)
print("Please input the gtin product code for the item you wish to purchase")
usersGTIN=input()
for i in range(sum1):
line=End[i]
sum2=line.split(",")
cost=sum2[2]
if sum2[0]==usersGTIN:
sum2[2]=float(sum2[2])
cost=(sum2[2])
product=(sum2[1])
GTIN8=(sum2[0])
stocklevel=int(sum2[3])
print("You have selected:",product)
quantity = int(input("How many of this item do you want to purchase?: "))
final_price=float(quantity*cost)
quantity=int(quantity)
final_price=float(final_price)
GTIN8=int(GTIN8)
wouldyouliketopurchaseanotherproduct = input("Would you like to add another item to your order y/n: ")
if wouldyouliketopurchaseanotherproduct == "y":
continue
elif wouldyouliketopurchaseanotherproduct == "n":
amount_of_stock_left=(stocklevel-quantity)
print((amount_of_stock_left),'left of stock remaining')

https://gyazo.com/590a490be3479a6e 70e772a6e0b7 7f46 (remove spaces) excel file
https://gyazo.com/b359beb1f939ec0dd 6d588354b989 27a (remove spaces) excel file

the output of code- https://gyazo.com/49e 821e3b3f73ddf2c0d615 18134f40a (remove spaces) excel file

i need help on the file, on how to import the data into the excel file (modify it) so that the current stock level amount is changed.If the Current stock level is less than or equal to 5 for example (using yoghurt as example, see screenshot for more info) it would automatically change the current stock to 15 due to being target stock level.
please help
#1 · 9y ago
Nimboso
Nimboso
Edit your post and post the code in [code] tags with the white space.
#2 · 9y ago
KA
Kappatos
First of all,learn how to give accurate/"good" names to ur variables.

In the name of God,why someone would give a name "woulduliketopurchaseanotherproduct" to a variable?
Also,sum2, sum1=len(End) and later on using it as sum1 in for loop ,hurts ur eyes...

If i understood ur answer correctly (and obviously,this is a part of the code),u need to do some checks into amount_of_stock =(stocklevel-quantity).
Get that number,do the checks,and edit the file.If u dont know how (it looks like u know since u have edited one in the link),just google

If u dont know,just pay someone to teach u/show u
#3 · edited 9y ago · 9y ago
Darkenforcer22
Darkenforcer22
Quote Originally Posted by Kappatos View Post
First of all,learn how to give accurate/"good" names to ur variables.

In the name of God,why someone would give a name "woulduliketopurchaseanotherproduct" to a variable?
Also,sum2, sum1=len(End) and later on using it as sum1 in for loop ,hurts ur eyes...

If i understood ur answer correctly (and obviously,this is a part of the code),u need to do some checks into amount_of_stock =(stocklevel-quantity).
Get that number,do the checks,and edit the file.If u dont know how (it looks like u know since u have edited one in the link),just google

If u dont know,just pay someone to teach u/show u
could help me make python create blank excel file which contains the following details:

GTIN-8 Product name currentstock

The current stock is the currentstock minus the use quantity input
#4 · 9y ago
KA
Kappatos
I told u exactly what to do ,and if u dont know how to edit it etc,just use google.
Check if the stock level is lower than 5,stock level is 15.Thats the only thing when it comes to fixing the value.

I gave u the hint,go on and code it.Sry i dont code for free
#5 · 9y ago
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

  • Making A Program To Open Another Program - Need Help !By GreenPro in Visual Basic Programming
    20Last post 13y ago
  • I Need help creating a money hack program?By mg_8090 in General
    8Last post 17y ago
  • Need help with visual basic PHISHING programBy mariofan901 in Visual Basic Programming
    14Last post 16y ago
  • [Help] I need help with my first c++ programBy yodaliketaco in C++/C Programming
    6Last post 16y ago
  • Batch MultiFunction Program (need help)By jijee in Combat Arms Discussions
    0Last post 16y ago

Tags for this Thread

None