557 Views

Print the sum of the array's elements as a single integer


Harsh Raj 13th May, 2021
Answer (1)
Palak kumari 13th May, 2021

Hi there,

The code for the following, is:-

number_of_elements = int(raw_input())

array = map(int, raw_input().split())

print sum(array)

Hope it helps!

Related Questions

East Point College | BBA Admi...
Apply
NBA Accredited | AICTE Approved
TAPMI MBA 2025 | Technology M...
Apply
MBA Admission Open in Technology Management and AI & Data Science | NAAC A++ | Institution of Eminence | Assured Scholarships
Amity University, Noida Law A...
Apply
700+ Campus placements at top national and global law firms, corporates, and judiciaries
East Point College | MBA Admi...
Apply
NBA Accredited | AICTE Approved
Entrepreneurship Development ...
Apply
PGDM- E Admissions 2021 | Among Top 25 Entrepreneurship Schools in India
Chitkara University MBA Admis...
Apply
NAAC A+ Accredited | 100% CAMPUS RECRUITMENT
View All Application Forms

Download the Careers360 App on your Android phone

Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile

150M+ Students
30,000+ Colleges
500+ Exams
1500+ E-books