#12 Python Tutorial for Beginners | Number System Conversion in Python

#12 Python Tutorial for Beginners | Number System Conversion in Python

Telusko

5 лет назад

1,019,541 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Daksh Pawar
Daksh Pawar - 03.11.2023 03:59

All I agree, but why hi Aliens? 😂

Ответить
Niki
Niki - 02.11.2023 13:45

if you want to convert from one system to another. you can use function for ex: hex(int('1010',2)) in the output: oxa

Ответить
Shankar Gope
Shankar Gope - 02.10.2023 14:26

That's a wonderful session regarding number system conversion to one from another 👌
a = 15
b = 12
x = (a // 4 + b ** 3) < 2000 and (b % 4 != 0)
here b ** 3 = 1728 and a // 4 = 3. So, (a // 4 + b ** 3) = 1731 which is < 2000 --> True
b % 4 = 0 remainder so, b % 4 != 0 is False.
so output of x is False

decimal to binary conversion -->
31 - 0b11111, 52 - 0b110100, 65 - 0b1000001
binary to decimal conversion -->
0b110011010 - 410

Ответить
Nawaz Khan
Nawaz Khan - 29.09.2023 13:10

It gives the output as False because it satisfies the first condition (1731<2000) and for the second condition it fails (12%4! =0).
For the 'and' operator both conditions should be true. Therefore, the answer is False. @Telusko

Ответить
K.s Muscan
K.s Muscan - 04.09.2023 17:11

The answer is false

Ответить
sai_lu
sai_lu - 02.09.2023 19:55

Please anna repu 3 ki ibm exam vundhi coding help cheyyandi anna

Ответить
PRATAP KUMAR CHOUDHURY
PRATAP KUMAR CHOUDHURY - 30.08.2023 16:12

Hw answer is false because 1731<2000(true) but 12%3 is not 0(false) hence it is false and no op due to no print function

Ответить
Raviteja Thiruveedhi
Raviteja Thiruveedhi - 03.08.2023 08:30

The ans for that question that u have given is "False"becoz it is (and) operator before the and operator it is True value and after (and) the value is "False" sir

Ответить
Daniel Tochi
Daniel Tochi - 02.08.2023 23:26

The answer is False because the final answer would contain True and False, according to the truth table of and. Both have to be True for the result to be True. some common terms to note when solving are as follows: //-removes float, **-means raised to the power of a number, % remainder of a division, !-not. With these you should understand how to solve the question.

Ответить
NVH
NVH - 30.07.2023 17:34

Really fun in learning, engineering didn't teach how to use this

Ответить
k. yagna charan
k. yagna charan - 21.07.2023 16:05

Bro this de

Ответить
Shubham Biswas
Shubham Biswas - 19.07.2023 08:04

output will be False as right condition of 'and' operator is false

Ответить
IBELIEVEINYOU
IBELIEVEINYOU - 18.07.2023 20:08

Ok i did my code for today (18)

Ответить
Arpit Ak
Arpit Ak - 10.06.2023 12:57

sir its using ip conversion formula to convert in binary form 00000000 . means 128 64 32 16 8 4 2 0 it is easy to understand

Ответить
Sumi Das Dutta
Sumi Das Dutta - 05.06.2023 07:31

Hometask done...bin(31)=0b11111, bin(52)=0b110100, bin(65)0b1000001, the output of x is false as 1731<2000 is True but 0!=0 is False, so as per Truth Table 'and ' operation refers if one case case is true and other is false then ultimate output is False...Thanks again Mr. Reddy for teaching these concepts so well..

Ответить
Simran Kaur
Simran Kaur - 24.05.2023 17:17

Output:False

Ответить
Madhu Vamsi
Madhu Vamsi - 16.05.2023 10:24

ans to quiz is false because the second condition is not satisfying

Ответить
Shiva Ranga Reddy
Shiva Ranga Reddy - 10.05.2023 08:53

true

Ответить
PK MUSIX
PK MUSIX - 02.05.2023 18:08

45

Ответить
para yaswanth chakravarthi
para yaswanth chakravarthi - 01.05.2023 15:10

False

Ответить
@ALL_STORIES
@ALL_STORIES - 27.04.2023 13:01

done

Ответить
علي
علي - 21.04.2023 02:19

Thank you very much

Ответить
Deepthi rayala
Deepthi rayala - 11.04.2023 12:42

it is true

Ответить
saniya shaikh
saniya shaikh - 17.03.2023 17:36

110011010...ans 256..
M i ri8

Ответить
Siddhant Raj
Siddhant Raj - 15.03.2023 11:36

false
a//4 + b**3 = True
but
b%4 =0 hence 0!=0 is False

Ответить
Salkineni Swetha
Salkineni Swetha - 24.02.2023 14:48

Sir can u tell the output at last question

Ответить
meaninglessnowadays
meaninglessnowadays - 31.01.2023 16:35

False. Cause the result of the first parenthesis is 1731. And that is not less than 2000. The second parenthesis gives True though

Ответить
Prathap K G Prathu
Prathap K G Prathu - 29.01.2023 19:51

Its possible to convert floating value to binary?? for example 23.5 to binary???

Ответить
Vineet Honkan
Vineet Honkan - 29.01.2023 17:46

you really didn't focus on the octal or the hexadecimal in this specific lesson as much as you focused on the binary to decimal (not saying that is bad tho as I did learn something regarding conversions)...

Ответить
milan singh
milan singh - 20.01.2023 19:35

Can anyone suggest me any videos to understand this topic deeply because I'm from non computer background it's difficult to understand for me

Ответить
ravi mittal
ravi mittal - 10.01.2023 19:29

x=1731 is <2000 and thus True
b%4 =0 and thus b%4 !=0 is False
since & operator is used both conditions have to be true for the final statement to be true. but 2nd part is False. so the output will be False

Ответить
Calvin Nguyen
Calvin Nguyen - 07.01.2023 06:11

for 110011010 it said 410 why is that?

Ответить
pulimi ashok
pulimi ashok - 22.12.2022 22:24

I think r palakadam raadhu kadha

Ответить
Kaviya
Kaviya - 21.12.2022 17:30

X=false

Ответить
Shawn
Shawn - 15.12.2022 13:47

Wow. I love your teaching. I tested my self on a lot of binary equations both ways and was getting all of them correct. I’m also a total beginner. Thank you.

Ответить
Jai Sriram
Jai Sriram - 11.12.2022 07:11

Hi Navin, I am a serious fan of you and your videos and the way you teach and finally smartly say 'bye bye'. It's like I am stick with you like glue. Can you please help me to be a python Master.

Ответить
Jai Sriram
Jai Sriram - 11.12.2022 07:09

While changing from Binary to decimal getting traceback errors. I am putting Ob11111 and expecting result as 31 but getting Traceback error, name error: name 'Ob111111'is not defined. Please advise me

Ответить
Abdellah Moukarrame
Abdellah Moukarrame - 07.11.2022 17:04

X
False

Ответить
Jadapolu Manu
Jadapolu Manu - 03.11.2022 19:19

For 31-'0b1111'
For 52-'0b1001000'
For 65- 'ob1000001'


For 110011010 -820.

Manually calculated if any mistakes iam sorry sir.

Ответить
Yathati Sankeerth_8229
Yathati Sankeerth_8229 - 30.10.2022 13:35

Answer is False (1728<2000) and False

Ответить
Kalavala Sureshkumar
Kalavala Sureshkumar - 16.10.2022 15:00

false

Ответить
Abhi
Abhi - 13.10.2022 06:54

x=(a//4+b**3)<2000 and (b%4!=0)
here first we need to finish the operations mentioned in the brackets
a//4 is 3 (actual value is 3.75 but this symbol "//' takes only int values)
b**3 is b raised to 3 so 1728
x=(a//4+b**3) output is 1728+3= 1731


b%4 the remainder is 0
(b%4!=0) is false i.e 0 is equal to 0
1728 is less than 2000 but the statement as false so it doesn't satisfy both conditions
1728< 2000 and false
output of x= false

Ответить
Sonu Poonia
Sonu Poonia - 11.10.2022 17:05

Thanks I'm 1in the class 👍🏻👍🏻

Ответить
Priyansh Kumar
Priyansh Kumar - 10.10.2022 11:36

Output : False

Ответить
Madem Venkata Aditya Prakash
Madem Venkata Aditya Prakash - 09.10.2022 15:47

Answer for homework question is false

Ответить
Subhashini
Subhashini - 08.10.2022 10:23

False

Ответить
K Mahitha
K Mahitha - 03.10.2022 04:10

int,float,complex,bool

Ответить
Nightmare
Nightmare - 01.10.2022 17:28

Answer: False
First of all - (//:print the quotient as integer, ** - Power, % - Modulus(Get the remainder), != not equal to)
(a // 4 + b**3) < 2000 and (b%4 !=0)
= (15 // 4 + 12**3) < 2000 and (12%4 !=0)
According to bodmas = 3 + 1728 < 2000 and 0 !=0
Hence, = 1731 < 2000 and 0!= 0
The first condition is true but the second is false, hence the solution will come as 'False'
[Do not include brackets in solution]

Ответить
Kalai Pradeep
Kalai Pradeep - 24.09.2022 09:47

A = 15
B = 12
X = (a // 4 + b ** 3) < 2000 and (b % 4 != 0)
Ans : False
Because
( a // 4 + b ** 3) = 1731
(b % 4 != 0) = [0 = 0] this statement is wrong.....
So x = False
......................

Ответить