- 3

a=0.01 n=int(input()) c=2**n d=a*c print(d)

24th Aug 2021, 1:03 PM
Munikoti Siva Rama krishna
8 Respuestas
+ 5
Munikoti Siva Rama krishna , your code works fine as long as you input a number when the input() function is demanding this. if you input nothing and then press enter, a value error occurs ( this is valid for regular IDE's) talking about sololearn, you need to input the required value in the input window. if you press enter and input your value in the second line, the value error comes up when you press submit. when input of the value is done in the first line and then press submit, it is working properly. it would be helpful if could copy and paste the complete error message and post it here. thanks!
24th Aug 2021, 2:41 PM
Lothar
Lothar - avatar
+ 3
I tried this code and it works fine. I tried with 2 and got 0.04.
24th Aug 2021, 1:55 PM
Musaab
Musaab - avatar
+ 1
Hi Munikoti! We can take a decision after combining your last two posts. It raises an error because you have to hardcode your solution instead of taking input. For that, you can give a direct value 30 to n. This can be done easily if you read their hints and tasks carefully.
24th Aug 2021, 2:47 PM
Python Learner
Python Learner - avatar
0
It shows value error
24th Aug 2021, 1:03 PM
Munikoti Siva Rama krishna
0
Why
24th Aug 2021, 1:03 PM
Munikoti Siva Rama krishna
0
Yeah but when solve this it raises value error
24th Aug 2021, 1:06 PM
Munikoti Siva Rama krishna
0
Munikoti Siva Rama krishna but work's for me too Will u share your code link..
24th Aug 2021, 2:07 PM
Pariket Thakur
Pariket Thakur - avatar
0
Hello
25th Aug 2021, 1:04 AM
Diong David