ASCII Codes

Computer Science Level pending

An ASCII(stands for American Standard Code for Information Interchange) Code is the numerical representation for a character, as computers can only understand numbers

Example: ASCII code for '0' is 48


A string of characters is given, "brilliant.orgiscool" , where x x is the sum of the ASCII code of all characters

Find the last three digits of x x

Details and Assumptions:

The full list for ASCII Codes can be obtained here at ASCII Table

Image credit: http://www.asciitable.com/

You may try Part 2


The answer is 984.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Hasmik Garyaka
Sep 20, 2017

Python sum(ord(c) for c in 'brilliant.orgiscool')

Java code void ascii() { String s="brilliant.orgiscool"; int t=0; for(int i=0;i<s.length();i++) { t=t+(int)(s.charAt(i)); } System.out.println(t); }

Thank you

You can get the program from here

Daniel Lim - 7 years, 3 months ago
Daniel Lim
Mar 4, 2014

You can try to solve it with this program

It is C++, not python

Daniel Lim - 7 years, 3 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...