Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

1. Print equations to the browser. In your script, create the following variables: $x=10 $y=!

"rite co#e to print out the following: 10 $ ! = 1! 10 % ! = & 10 ' ! = !0 10 ( ! = 1.)*+,!1)*+,!1) 10 - ! = & .se nu/bers only in the above variable assign/ents, not in the echo state/ents. 0ou will nee# a thir# variable as well. *. 1reate a function that accepts an integer, an# then, outputs a /essage base# on the re/ain#er of that nu/ber when you #ivi#e it by ,. .se a 2switch3 state/ent for the logic. 4or a re/ain#er of 0, print: 56ello7 4or a re/ain#er of 1, print: 56ow are you87 4or a re/ain#er of *, print: 5I3/ #oing well, than9 you7 4or a re/ain#er of &, print: 5:ee you later7 4or a re/ain#er of ), print: 5;oo#%bye7
&. "rite #own P6P co#e to print all <== nu/bers between 0 an# 100. a> .sing for loop b> .sing while loop

). .se two for loops, one neste# insi#e another. 1reate the following /ultiplication table: 1 * & ) , ? ! * ) ? + 10 1* 1) & ? @ 1* 1, 1+ *1 ) + 1* 1? *0 *) *+ , 10 1, *0 *, &0 &, ? 1* 1+ *) &0 &? )* ! 1) *1 *+ &, )* )@

You might also like