cecilia16cheng cecilia16cheng
  • 02-06-2021
  • Computers and Technology
contestada

Which of the following passes an int argument into a method named print? Chose one option and explain why.

o print();
o print()+5;
o print("5");
o print(5);

Respuesta :

fichoh
fichoh fichoh
  • 07-06-2021

Answer:

print(5)

Explanation:

Passing an int argument into the method named print ;

print() ; Here, the print method has no argument as it is empty

print()+5; Here also, the print method has no argument and adding +5 is an invalid syntax.

print("5") ; Here, print takes in an argument, however, the argument is a string due to the fact that 5 is enclosed by quotation marks.

print(5) ; Here, the integer is 5 is passed to the print method.

Answer Link

Otras preguntas

helpp!!!!!! What is X?
Jessie saw the label of a box indicating that they are 50 packs of groceries inside it.Each pack of groceries weights 1 kg. a.How many g does each pack of groce
When the oxygen in the air combines with the iron exposed by paint peeling off an old bicycle, a new, red-colored, crumbly substance is formed. Physical or chem
write a division equation that represents the question: how many 3/4 are in 5/4
3 - Répondez answer each question in the negative. Then, compare your answers with the speaker's. Modele You hear: Est-ce que tu habites en France? You say: No
9// Please help for 20 points!! thank you if you help
Why does scout end up beating up dill at the end of chapter?
Sunny’s Surf Shop sold 20 surfboards last week. This week, they will sell 320 percent as many. How many surfboards will Sunny’s sell this week?
How do you know so much english in japanese translate.
6// Please help for 20 points!! thank you if you help