Skip to content

Latest commit

 

History

History
243 lines (105 loc) · 2.08 KB

File metadata and controls

243 lines (105 loc) · 2.08 KB
1+1
2
x = 30
print(x)
30
p = 100
r = 10
t = 5
interest = p*r*t/100
interest
50.0

Q1: Choose your base between 3 and 13

Q2: Add/Substraction single digit and multiple numbers in your number system

Q3: Prepare a table of single digit multiplications in your number system.

Q4: Multiply multiple digits in your number system

Q5: Convert 1, 10, 20, 30, 100 from your base to base10.

Q6. Write a strategy to convert a number in your base to base 10 in plain english or psedo code or code

Q7. Write a strategy to convert a number in base N to base M in plain english or psedo code or code

Q8.

Q: In base 10, how many numbers can you represent in 5 digits?


0 to 99999 A: 10**5

1 -> 00001
6 -> 00006

Q: In base 7, how many numbers can you represent in 5 digits?

A: 7**5

Q: In base B, how many numbers can you represent in d digits?

A: B**d

To represent to but not including 10000 in base10, how many digits do you need?
Object `need` not found.

Q: To represent number up to 9999 in base10, how many digits do you need?

A: Four Note: we are representing total 10000 numbers

Q: To represent N numbers, how many digits do we need in base 10?

A: log10(N)

Q: Compute log10 of 100
A: log10(100) = 2
import math
math.log10(10)
1.0
math.log10(1000)
3.0
math.log10(50)
1.6989700043360187
10**1.6999
50.10718442871759
# log(346)
10**2.45
281.8382931264455
10**2.6
398.1071705534973
10**2.52
331.1311214825911
10**2.53
338.84415613920237
10**2.54
346.73685045253166
10**2.539
345.93937782612204

Q: Write your own algorithm or strategy to find log10. You can use 10**x.

# Q: To represent N numbers, how many digits do we need in base B?

# A: logB(N)