Skip to main content
LetsUpgrade
Asked a question last month

🏅 Weekly Code Battle - Week 21

This question has a reward worth 10 LetsUpgrade Coins from LetsUpgrade and is in decision making phase!

Reward rules

Battle Format

  • Every week 1 question will be posted on Monday.
  • Answers to be submitted by Google Forms only. Write “I have submitted the solution” in the Answer below Question. Anonymous answers will not be considered
  • First 30 entries per question will be considered for evaluation.
  • Entries are accepted till Thursday only.
  • After that the team will assess your submission.
  • The winner will be declared on Monday before the next Battle on Community and Telegram Channel.
  • The best answer per question will be rewarded with 10 LetsUpgrade Coins and the title of that character. After all the main characters for Mirzapur are given, there will be a Final Battle amongst the Title Holders who will compete for the Title of “Guddu Pandit”.

Rules for Weekly Code Battle

  • One Question. One Answer : Each student should send only one entry per question. If you send multiple answers, you will not be considered eligible for rewards.
  • Submit Answer via Form only : Do not post answers in comments. You have to submit your answers via the given form only.
  • Duration : Each question will be available for 4 days for students to answer.
  • Answer : One line answers will not be counted. Your answers should consist of 2 sections:-
    • Explain the logic implemented.
    • And then your solution.
  • Code should be properly indented where required.
  • After submitting the Google Form, mention “I have submitted the solution” in the   “Answer section” below the Question.
  • Rewards  : Each question will have certain LetsUpgrade coins as a reward. These coins can be redeemed to apply for upcoming LetsUpgrade Events, Courses, Mentorship.
  • If you have any other queries related to the Quiz Format or Rules, mention in the comment section below. Do not ask Questions in the Answer section.

Question

You are Satyanand Tripathi,Father of Kaleen bhaiya who has set up an imposter in Kaleen bhaiya’s gang to get regular information about the work and is not known to anyone else. You have to maintain secrecy and ensure that no one else gives wrong information and hence you have asked your imposters to input a string expression representing an addition or subtraction in 8-bit 2's complement arithmetic and want to see the result in base 10 followed by the binary representation . If the input is outside the range of 8-bit 2's. complement, return "Unauthorized"  so you can know that he is not the imposter you set up. Being Satyanand Tripathi write a Javascript Program that returns the result in base 10 followed by a binary representation. If any of the values are outside the range of 8-bit 2's complement, return "Unauthorized ".

Upload your solution file at : https://forms.gle/jnF9bNdnQqAYjcMs6

Fuel your ambition, discover your passion and achieve your professional goals with LetsUpgrade.
Sign Up Now