Python Forum
Python VS Code: using print command twice but not getting output from terminal - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Python VS Code: using print command twice but not getting output from terminal (/thread-39169.html)



Python VS Code: using print command twice but not getting output from terminal - kdx264 - Jan-12-2023

Hi, I have autism and am brand new to Python. I am trying to output these two print statements I wrote in my code to see the sum of a, b, and c as well as the total number of apples that Adam, John, and Mary have. However, when I tried running those print statements the terminal did not output anything and I am not sure what what it is that I am missing?

Here is a URL of the image of my code and output: [Image: bNRhDRW]


RE: Python VS Code: using print command twice but not getting output from terminal - menator01 - Jan-12-2023

Please post code using bbcode tags. Makes it easier to help.


RE: Python VS Code: using print command twice but not getting output from terminal - Skaperen - Jan-12-2023

what are the two answers you expect to get?

what does the ** operator do?


RE: Python VS Code: using print command twice but not getting output from terminal - deanhystad - Jan-12-2023

96**98**97 is taking a long time to compute because it is an immensely large number. How big? This is 5**5**5.

1911012597945477520356404559703964599198081048990094337139512789246520530242615803012059386519739850265586440155794462235359212788673806972288410146915986602087961896757195701839281660338047611225975533626101001482651123413147768252411493094447176965282756285196737514395357542479093219206641883011787169122552421070050709064674382870851449950256586194461543183511379849133691779928127433840431549236855526783596374102105331546031353725325748636909159778690328266459182983815230286936572873691422648131291743762136325730321645282979486862576245362218017673224940567642819360078720713837072355305446356153946401185348493792719514594505508232749221605848912910945189959948686199543147666938013037176163592594479746164220050885079469804487133205133160739134230540198872570038329801246050197013467397175909027389493923817315786996845899794781068042822436093783946335265422815704302832442385515082316490967285712171708123232790481817268327510112746782317410985888683708522000711733492253913322300756147180429007527677793352306200618286012455254243061006894805446584704820650982664319360960388736258510747074340636286976576702699258649953557976318173902550891331223294743930343956161328334072831663498258145226862004307799084688103804187368324800903873596212919633602583120781673673742533322879296907205490595621406888825991244581842379597863476484315673760923625090371511798941424262270220066286486867868710182980872802560693101949280830825044198424796792058908817112327192301455582916746795197430548026404646854002733993860798594465961501752586965811447568510041568687730903712482535343839285397598749458497050038225012489284001826590056251286187629938044407340142347062055785305325034918189589707199305662188512963187501743535960282201038211616048545121039313312256332260766436236688296850208839496142830484739113991669622649948563685234712873294796680884509405893951104650944137909502276545653133018670633521323028460519434381399810561400652595300731790772711065783494174642684720956134647327748584238274899668755052504394218232191357223054066715373374248543645663782045701654593218154053548393614250664498585403307466468541890148134347714650315037954175778622811776585876941680908203125

Remove "total_apples_product = john**mary**adam" from your program and you will see your print.


RE: Python VS Code: using print command twice but not getting output from terminal - Skaperen - Jan-16-2023

a number that large will run out of memory on the largest computer ever made. do you hope to be able to save that number.

FYI: i, too, am on the autism spectrum: Asperger's. there is a good chance that others here are, as well. no reason to be afraid here. we all get along. join in.