Calculator 2.0 (updated) 😊😊 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
17th Jun 2017, 11:43 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
19 Answers
+ 5
@Sami Khan: It's surprising to use % operator as its first mathematical purpose, and not as the modulo computer operator ;D
20th Jun 2017, 12:41 PM
visph
visph - avatar
+ 4
@Siddharth Saraf wrote: << How's mine >> It's not responsive and not following semanticals recommandations of Html5 ;P You can improve it by avoiding use of <table> faimily elements for your layout, and set your css dimensions with (more) relatives units ^^ ( think about vw and vh units relative to viewport size for example ;) )
19th Jun 2017, 2:38 PM
visph
visph - avatar
+ 4
@Siddarth: I have to correct/adapt a few my answer: you have try to make it responsive, and made different layouts at least for lanscape and portrait orientation... that's fine, but on certain circumstances (as when I first open your code in web site code playground) keyboard not fit in display height, so it require to scroll down-up for access between last bottom keyboard line and result display: that's the reason why I had qualified your code of 'not responsive' ;) Anyway, you have always too much "fixed" sizes (as font ones), so keys are distributed depending on viewport size, but they doen't be adapted to it (big sized viewport will have more visual padding to each keys, and tiny will get too few ^^), as well as <table> is missusing for that kind of purpose ;P
20th Jun 2017, 6:32 AM
visph
visph - avatar
+ 4
Sorry I made a mistake with the explanation. Enter the following sequence 25/125% it should give you the 25% included in 25 it doesn't do it. If you buy something that includes the VAT and you need to know the amount without VAT that's how you do it.😀
20th Jun 2017, 12:36 PM
🇺🇸 Anatoli🇧🇪🇪🇺 ,
🇺🇸 Anatoli🇧🇪🇪🇺 , - avatar
+ 3
*** TEASER :P *** I'm actually doing a rework of your calculator, based on the first version found before update (while you seems try to implement more keys with slide effect -- but not working, and only filled with 'dot' keys)... I will post it here when I will be enough satisfied, but don't know when, as I have others things to do IRL, and because it require more stuff than I was initially thinking to do it near of perfect (progressively, I turn it in more advanced work, improving my first goals ^^), even if I already have working versions ;)
19th Jun 2017, 12:21 PM
visph
visph - avatar
+ 3
I was meaning that before update(s) and before toggle button on display... (seems to have been update once more since my last look at, as the toggle button isn't at the same place) So I was starting my reworks from your version where there wasn't the toggle button on display, but on keyboard (at right side) with a unique column of 'dot' keys... it was buggy at this time (not now), and I thinked that you want a slide effect (not a toggle one as now)... Anyway, I wasn't criticized your work, but was inspired for improve it ;)
19th Jun 2017, 1:15 PM
visph
visph - avatar
+ 3
@Sami try the following 25*5% it will show you Characters instead of numbers like the percentage you want to calculate.
20th Jun 2017, 12:30 PM
🇺🇸 Anatoli🇧🇪🇪🇺 ,
🇺🇸 Anatoli🇧🇪🇪🇺 , - avatar
+ 3
@Sami: Sorry sir, but I just wanted to point out a problem in your code to make it flawlessly. I never had or ever intended to miscredit you in anyway, but this should be a simple basic calculation that any calculator should be able to do. By making mistakes we are able to learn and evolve into a smart race. My apologies if I offended you in any way. But your statement in your last posting addressing me is wrong😕😕😕😕😭😭😭😞😞😞😲😲😲
20th Jun 2017, 12:48 PM
🇺🇸 Anatoli🇧🇪🇪🇺 ,
🇺🇸 Anatoli🇧🇪🇪🇺 , - avatar
+ 3
Well so, it's time to publish mine... as it will be never perfect, I wanted that it would be best working as possible, finding the right way between too much perfectionnism or desire of new improvement/feature to add without end, and too much basic functionnalities or not enough finalized version implemented... So now, I think its a good release point: https://code.sololearn.com/WwXEzIanjfAo/#js Done with the constraint of another one code as basis (@Sami Khan), I have respected the initial style (colors and slide panel for hidden keys), but I quite rewrote all, by force of fixing-improving, as well Html, Css and a lot improved JS... Anyway, there\'s necessarly some bugs remaining, few cases not encountered with my numberous already tests: fell free to notify them in comments, I will try to solve them... Maybe some features as undo/redo, improved memory handling or more keys/functions would be implemented in future, depending on my inspiration and my free time ;)
23rd Jun 2017, 2:46 PM
visph
visph - avatar
+ 2
ah sorry.. I didn't mind.. I thought u were talking about current state.. sorry for misinterpretation..
19th Jun 2017, 1:17 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 2
i don't find any mistakes in the calculations... and as per the interface it is not responsive yet...
20th Jun 2017, 12:03 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 2
calculate like 25*5= 125%
20th Jun 2017, 12:31 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 2
😂😂 I dont think u gonna open the solo learn app and then my profile and then my codes and this calculator while purchasing any items... 😅😅 well will look at it..
20th Jun 2017, 12:38 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
the slide effect is working fine
19th Jun 2017, 12:22 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
19th Jun 2017, 1:20 PM
Siddharth Saraf
+ 1
Your calculator is not calculating correctly but it looks nice. However the buttons for +×÷% etc should be a little bigger or more prominent. Your color choice makes it difficult to find the required key on the board. By the way, I did run your code on a 7 inch Samsung Tab 5 Pro
20th Jun 2017, 7:25 AM
🇺🇸 Anatoli🇧🇪🇪🇺 ,
🇺🇸 Anatoli🇧🇪🇪🇺 , - avatar
+ 1
ya being a programmer 😅😅
20th Jun 2017, 12:42 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
hehe it's just a taunt.. am not offended.. if u felt so, then sorry 😄😄
20th Jun 2017, 12:55 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
found a bug: try doing 6 ** 6
19th Jun 2017, 6:40 AM
Eldar Bakerman