+2

# Solutions to practice

4/29/2021 2:20:12 PM

Елена Леващева

+3

Nowhere, these tasks are not for "copy paste", it would not make sense if you could find solutions. If you have problems, ask for help here, but don't expect anyone to give you code if you did not try solving it yourself

+3

And you can check if your code produces correct results by hitting Run

+2

Thanks a lot for your replies. I will think about it. But are you sure that if your first teacher just gave you alphabet without many examples how to use it you would be able to learn reading?

+2

6.2 Practice. Textbook for students. There, it is said you should use %. I didn't (because I didn't know what for). But the result is ok. So what? Is my code good? Is it DRY or WET?

+2

You know I think I understood the reason why task solutions are not given. This has given the best thing about Sololearn, namely it is community!!. I have just read one kid message, he was suffering from cerebral palsy. He was scared after talking with his doctor. It was three years ago. 27 people responded, they tried their best to support him. I never forget this.

+2

your new solution is wrong. your program will be damaged by this. it will stop working at other input values. the task of the programmer is to make a universal program for any values and also to provide all possible options for entering incorrect data. This is my solution: need_book = ((group1 * 2) + (group2 * 2)) remains_book = books % need_book print(remains_book)

+2

Thank you very much both for your advice and joke. Both are great! 😂 I will change the code and let everyone know. But again the system accepted my second incorrect code. We apparently need to ask Sololearn to provide us with the best solutions. At least after our kind of solving a task in any format (txt)

+2

Thanks a lot!!!!! Now i start understanding what i am doing

+2

That is the updated group1 = 18 group2 = 19 avl_book = 76 need_book = ((group1 * 2) + (group2 * 2)) remains_book = avl_book % need_book print(remains_book)

+2

Ярослав thanks a lot. You are the best teacher. I will remember about this lesson. To say that it helped to say nothing. This lesson is worth to be published.

+2

Joke about a tester is nothing comparing to this

+2

Is it better? group1 = int(input()) group2 = int(input()) avl_book = int(input()) need_book = ((group1 * 2) + (group2 * 2)) remains_book = avl_book % need_book print(remains_book)

+2

Все равно буду изучать, если только не пойму, что все упёрлась в стену

+2

Спасибо, Вы так хорошо умеете всё объяснить. Здорово! Мы говорим про оперативную память и получается, что разворачивание программы (создание переменных) происходит в оперативной памяти. А сама программа есть файл в виде набора инструкций и находится на жёстком диске. Все что мы создали и сохранили (например таблица в ексел) не вносит изменения в программу, а создаётся в виде файла, который тоже сохраняется где-то на жёстком диске. Мне кажется, что мне понятно. Спасибо огромное ещё раз. Хорошего дня.

+1

❄ Websites To Practice Your Coding Skills ⚡ https://www.hackerrank.com ⚡ https://www.codewars.com ⚡ https://www.hackerearth.com ⚡ https://codecombat.com ⚡ https://projecteuler.net ⚡ https://brainwar.it ⚡ http://www.programmr.com ⚡ https://www.codechef.com ⚡ http://www.codeabbay.com ⚡ https://www.topcoder.com ⚡ https://coderbyte.com ⚡ https://leetcode.com ⚡ http://exercism.io ⚡ https://codefights.com ⚡ http://www.cyber-dojo.org ⚡ http://codingbat.com ⚡ http://www.pythonchallenge.com ⚡ https://codegolf.stackexchange.com ⚡ https://www.codingame.com ⚡ http://www.programmr.com ⚡ https://programmingpraxis.com 💧 Credit :: Maz

+1

why excel? not a word? 🤭 The operator of the remainder of the number % (for example: 17 % 3 = 2) 1. Take the nearest number when divided by 3 would be zero. That's apparently 15 2. Subtract 15 from 17 and the result is your answer.

+1

Заходит однажды тестировщик в бар... Забегает в бар. Пролезает в бар. Танцуя, проникает в бар. Крадется в бар. Врывается в бар. Прыгает в бар ...и заказывает: кружку пива, 2 кружки пива, 0 кружек пива, 999999999 кружек пива, ящерицу в стакане, -1 кружку пива, qwertyuip кружек пива. После открытия пользователь заходит в бар через окно и спрашивает: "где у вас туалет?" Бар крашится...

+1

About word or Excel.. I bet Excel is better for this purpose You can make kind of database . It is better to look through then.

+1

The code has been successfully accepted. need_book = ((18*2) + (19*2)) remains_book = 76 % need_book print(remains_book) Thanks again.

+1

😂😂😂😂 i will certainly correct