135201
You will be muted until you read the rules. Read them! @Rules_for_Python A group about the Python programming language. Offtopic things go here: @pythonofftopic Resources to learn python: @pythonres Group for Hy: @hylang Selenium: @SeleniumPython
I didn't. The code didn't seem to match the description of the task. The description felt unclear. It wasn't as clear as I suspected it should be, so I investigated. Turns out when translated from Russian, it would sound like that. Also the name in the profile was Cyrillic. Two hints. Enough for reasonable suspicion. Then I asked.
Читать полностью…
Yes, I'm from Russia, I translate, it's hard for me to communicate, but I can't find help
Читать полностью…
This is a problem from the example of the exam I'm going to have, what else?
Читать полностью…
And to pass well, I'm asking for help from you, which I don't get
Читать полностью…
The purpose of an exam assignment is to test your knowledge and capabilities to give you a grade that reflects your knowledge and capabilities. It defeats the purpose if others provide you help with that.
Читать полностью…
For n in range (1,100):
r = bin(n)[2:]
if n % 2 == 0:
r = r + “1”
if n % 2 == 1:
r = r + “0”
if n % 2 == 0:
r.count (“1”)
If n % 2 == 1:
r.count (“0”)
r = int(r,2)
if r > 54:
print(r)
I wrote the code so but the minimum number I have is 58
The minimum number R greater than 54 that can be a result of the algorithm is 56.
Читать полностью…
Hello everyone, who will help you figure out the problem?
Читать полностью…
I believe your mistake starts with the interpretation of the task at 2A. More specifically here:
if the number of units in the binary notation of the number is evenЧитать полностью…
Just the phrasing is a bit unusual. And it seems that a translation of the exam question from Russian to English would account for that oddity.
Читать полностью…
So it's a question that may come up in your exam or possibly was a task in previous exams, but this is not your current exam question?
Читать полностью…
What does that mean? I've been learning python quite recently and I only have an exam in a year
Читать полностью…
I'd suggest you start with and only focus on point 1. If the rest confuses you, it'll become clearer once you solved that point.
Читать полностью…
The natural number N is given to the input of the algorithm. The algorithm constructs a new number R on it as follows.
1. A binary notation of the number N is being built.
2. Two more categories are added to this entry on the right according to the following rule:
A) at the end of the number (on the right) is added 1, if the number of units in the binary notation of the number is even, and 0, if the number of units in the binary notation of the number is odd;
B) 1 is added to this entry on the right if the remainder of the division of the number of units by 2 is 0, and 0 if the remainder of the division of the number of units by 2 is equal to 1.
The record obtained in this way is a binary notation of the desired number R.
Specify the minimum number R, which exceeds 54 and can be the result of the algorithm. In the answer, write down this number in the decimal system.
Thank you for telling me. I never would have figured that out on my own.
Читать полностью…