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
using map
0
Author: The future is now thanks to science
Dark
Public
Save
PY
py
1
2
3
4
#This is th code:
cart =
[
15
,
42
,
120
,
9
,
5
,
380
]
discount =
int
(
input
())
print
(
sum
(
map
(
lambda
x
:
x-x/
100
*discount
,
cart
)))
Enter to Rename, Shift+Enter to Preview
OUTPUT