Python Online Compiler & Playground
HTML/CSS/JavaScript
HTML
CSS
Javascript
C++
C
PHP
Java
Python
Swift
C#
Ruby
Node.JS
Kotlin
jQuery
Go
R
TypeScript
Start Python Course
Register
06/25/2021 18:36
0
Author: The future is now thanks to science
Dark
Public
Save
PY
py
1
2
3
4
5
6
7
8
9
"created by Bryan Buenaver"
cart =
[
15
,
42
,
120
,
9
,
5
,
380
]
discount =
int
(
input
())
total =
[]
for
i
in
cart
:
total.append
(
i-
(
i*discount/
100
))
print
(
sum
(
total
))
Enter to Rename, Shift+Enter to Preview
OUTPUT