+ 4

Multiple input

Which function can be used to add multiple inputs in a code and print its sum. It will be great if to have an example

13th Apr 2021, 4:33 AM
Veena Tirmal
Veena Tirmal - avatar
2 Answers
+ 14
Example: x= list(map(int, input("Enter a multiple value: ").split())) print("List of students: ", x) print(sum(x))
13th Apr 2021, 4:56 AM
KǟrÉšsÉŠmǟ ❄
KǟrÉšsÉŠmǟ ❄ - avatar
+ 4
Veena Tirmal , as you already has finished python core tutorial and python for beginners tutorial, i am sure you are able to do this task by yourself. you can get some help from the community when you provide your attempt. please put your code in playground and link it here. thanks ! if you go to the community code coach exercises, you will find several tasks that require such inputs. use these exercises to get more experience in practical coding happy coding and good success!
13th Apr 2021, 10:58 AM
Lothar
Lothar - avatar