What does the following python code print out?
1 2 3 4 5 6 7 8 |
|
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Current year minus deans birth year= 34. Then dean minus dean minus kelly is 34-2= 32. Then 32-2= 30
34-2=30 You need to improve your elementary maths.
answer is 30
30
dean = current year - deans birth year dean=2013-1979 dean=34 kelly minus sam = 2 kelly = dean - dean minus kelly kelly=34-2 kelly=32 sam = kelly - kelly minus_sam sam=32-2 sam=30
we are asked to find PRINT SAM.So to find sam it is that kelly-kelly minus sam and kely=dean-dean minus kelly and kelly minus sam=2. so solve in following steps: 1)first find kelly 2)to find kelly first find dean which is current year-deans birth-year solution: dean=2013-1979=34 3)now subtract dean which 34 from dean minus kelly which is 2 solution: 34-2=32 kelly=32 4)now finally find sam 5)sam=kelly-kelly minus sam kelly is 32 and kelly minus sam=2, so answer is as follows solution: 32-2=30 which is sam
I have explained in details so that i could be understandable
current year = 2013 deans birth year = 1979 dean minus kelly = 2 dean = current year - deans birth year (2013-1979=34 ; dean=34) kelly minus sam = 2 kelly = dean - dean minus kelly (34-2=32 ; Kelly = 32) sam = kelly - kelly minus sam (32-2 = 30 ; Sam = 30)
print sam ;
Answer: 30
dean=2013-1979=34 kelly=34-2=32 sam=32-2
dean = current year - deans birth_year [dean = 2013 - 1979 = 34]
kelly = dean - dean minus kelly [34 - 2 = 32]
sam = kelly - kelly minus sam [sam = 32 - 2 = 30 ANS]
do it backwards: sam = kelly -kelly minus sam = dean - dean minus kelly - 2 [kelly minus sam = 2] = current year - deans birth year - 2 -2 [dean minus_kelly = 2] = 2013 - 1979 -2 -2 = 30
dean = 2013 - 1979 --> 34
kelly = 34 - 2 --> 32
sam = 32 - 2
= 30
current year = 2013, deans birth year = 1979, 34 minus kelly = 2, dean = 2013 - 1979 = 34, So kelly = 32 ,kelly minus_sam = 2 ---> 32 - sam = 2 ---> Sam =30 print sam = 30
Sam and Dean Winchester, by any chance? I just put Sam Winchester's age
2013-1979=34, 34-2=32, 32-2=30.
y=2013 d b y=1979 d m k=2 solution: dean=c y - d b y =2013-1979 =34
K m s=2 solution: kelly=dean - d m k =34 - 2 =32
sam=kelly - k m s =32 - 3 =30(answer)
dean=34 kelly=32 sam=30
current year = 2013 deans birth year = 1979 dean minus kelly = 2 dean = current year - deans birth year=2013-1979=34 kelly minus sam = 2 kelly = dean - dean minus kelly=34-2=32 sam = kelly - kelly minus sam=32-2=30 ANSWE (30)
dean=current year-deans birth year dean=2013-1979=34 kelly=dean-dean minus kelly=34-2=32 sam=kelly-kelly minus_sam=32-2=30
current year=2013 dear year=1979 dean -kelly=2 dean=2013-1979=34 kelly=32-2=30 sam=32-2=30 Ans: sam=30
given current year=2013 deans birth year=1979 dean= cy -deansbd=2013-1979=34 dean-kelly=2 34-kelly=2 kelly=34 -2=32 kelly - sam=2 we known kelly =32 therefore sam=kelly-2=32-2=30
dean = 2013 - 1979 = 34 kelly = 34 - 2 = 32 sam = 32 - 2 =30 So 30 is the answer
dean= 2013-1979= 34
kelly= ( dean=34) minus (dean minus kelly=2)
kelly= 34-2=32
sam= (kelly=32) minus (kelly minus sam=2) -
sam= 32-2= 30
dean=34 kelly=32 by solving hence sam=30 ....soo 30 is ans
Firstly find the value of dean=34 and then find the value of kelly=32 and then find the value of sam=30 printed value is sam. Hence required ans is 30
dean = 2013-1979 dean = 34 dean-kelly = 2 34-kelly = 2 kelly = 32 kelly-sam = 2 32-sam = 2 sam = 30
This program will be print: 2013-1979-2-2=30
This is a simple mathematics with +/- operation which is purely depends on your concentration . Beware of the variable names like dean minus kelly and kelly minus sam .
dean=2013- 1979( current year - deans birth year)=34 kelly=34-2(dean - dean minus kelly)=32 sam =32-2(kelly - kelly minus_sam)=30(bingo)
sam = ((2013-1979) - 2) - 2 = 30
First,find out how old Dean is.
2013-1979=34
Then,find out how old Kelly
Dean-Kelly=2
,so
34-x=2
x=34-2 =32
Kelly-Sam=2
=
32-x=2
x=32-2
Sam is 30 years old
sam is 30 year old
2013-1979-2-2=30
http://www.codeskulptor.org/
[2013-1979]=34 [dean's age] dean-kelly=2 {34-32=2} so 32 is kelly's age 32-30=2 {that is sam's age}
Sam = Kelly - Kelly minus sam = (current year - deans birth_year - 2) -2 = [(2013 - 1979) - 2] -2 = 34 -4 = 30
Dean's birth year is 1979 making him 34. Kelly is two years younger than him which makes her 32. Sam is 2 years younger than Kelly which makes him 30 years old.
Dean=current year minus birth year= 2013 - 1979= 34 Dean minus Kelly= 2, so 34 - Kelly= 2. Thus Kelly= 34-2= 32 Kelly minus Sam= 2, so 32 - Sam= 2. Thus Sam = 30
Deans age = 34 ---> Kelly age=32 --> Sam age=30
Problem Loading...
Note Loading...
Set Loading...
c y=2013 d b y=1979 d m k=2 solution: dean=c y - d b y =2013-1979 =34
K m s=2 solution: kelly=dean - d m k =34 - 2 =32
sam=kelly - k m s =32 - 3 =30(answer)