Python Forum
given 2 base 20 numbers write a program to subtract second from the first and return
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
given 2 base 20 numbers write a program to subtract second from the first and return
#1
Assume a base 20 number system which uses symbols 0-9 to represent values zero to nine and charectera A-J to represent values ten to nineteenth.

As an example the base 20 number 1JF3 can be written as
(1*20 power 3) + (J*20 power 2)+(F*20 power 1)+ (3*20 power 0)
This evaluates to 1*8000 + 19*400+ 15*20 + 3*1 = 15903 in decimalsystem

given 2 base 20 numbers write a program to subtract second from the first and return the result in base 20 format.

Need the python cide

Can anyone please help me out
Reply
#2
Looks like a homework to me, so I moved the thread to the respective section of the forum.
We are glad to help, but we are not going to do your work for you. Please, show us your best attempt at the code and asl specific questions regarding issues you can not solve yourself.
Reply
#3
Try it. If your attempt doesn't work, share your code and the error you get, along with your output, and the expected output, and we'll help you along the way. But we won't just do it for you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Write a program in python lana 6 1,144 Oct-11-2023, 05:30 PM
Last Post: deanhystad
  Random Generator: From Word to Numbers, from Numbers to n possibles Words Yamiyozx 2 1,370 Jan-02-2023, 05:08 PM
Last Post: deanhystad
Photo How can I write a Python program for this structogram? rauljp9483 6 51,948 Nov-24-2021, 06:57 AM
Last Post: buran
  Convert list of numbers to string of numbers kam_uk 5 2,935 Nov-21-2020, 03:10 PM
Last Post: deanhystad
  Return the sum of the first n numbers in the list. pav1983 3 3,956 Jun-24-2020, 03:37 AM
Last Post: deanhystad
  Calculator won't subtract? kingstarx 6 2,856 Oct-17-2019, 07:09 PM
Last Post: kingstarx
  [split] Please advise how to write this program Rmasson 4 3,081 Apr-20-2019, 01:53 AM
Last Post: Skaperen
  Write a program to compute the sum of the terms of the series: 4 - 8 + 12 - 16 + 20 - chewey777 0 2,780 Mar-24-2018, 12:39 AM
Last Post: chewey777
  Regular Expressions in Files (find all phone numbers and credit card numbers) Amirsalar 2 4,054 Dec-05-2017, 09:48 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020