James owns an electronics store and decided to purchase 1500 smartphones at a price of $400 each. He then sold each smartphone for $500. Write a Python program to calculate whether James made a profit or a loss, how many smartphones were sold, and how many are left unsold.
name
.num_purchased
), set to 1500.cost_price
), set to $400.selling_price
), set to $500.num_sold
), ask the user to input this number.This program will help James understand his profit or loss and track his stock.
We’re always looking for international STEM educators to join our team. If you are interested, please send us a mail and we’ll get back to you!
If you have any questions, kindly send us a mail. Don’t forget to follow and like all our social accounts to get updates on competitions!