Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1)Which of the following statements about the print statement are TRUE? (Check a

ID: 3587904 • Letter: 1

Question

1)Which of the following statements about the print statement are TRUE? (Check all that apply)

a. it is a Python built-in function

b. print(format(0.25, %))

displays: 25%

c.print("Hello world")

displays the message: Hello world

d. print('I am', format(2345.6789, '10,.3f'))

displays the message: I am 2,345.679

e.assuming y = 59, print(y)

displays: y

PartialQuestion 5

1.5 / 3 pts

Which of the following statements about variables are TRUE? (Check all that apply)

a.payRate is an example of a camelCase variable name

18.39 = payRate

b.is a Python statement that creates a variable called payRate and assigns the value 18.39 into it

c.when you assign a value to a variable, the variable will reference that value until you assign it a different value

d.a variable is a name that represents a value in the computer's memory

e,the variables discussed in chapter 2 can hold integers, real numbers, and strings

PartialQuestion 6

2.25 / 3 pts

What is/are the result/s of the following Python statement? (Check all that apply)

a = input("How old are you?")

age = int(a)

a.variable a is of type integer

  

b.How old are you?

is displayed on the screen

c.the value that is returned from the input function is assigned to variable a

d.assuming the user entered a value consistent with an integer, the value returned by the int function is assigned to the age variable

e.variable age is of type string

f.during the execution of the first statement the program pauses and waits for the user to type something

Explanation / Answer

1)Which of the following statements about the print statement are TRUE?

a)it is a python built -in function TRUE

b. print(format(0.25, %))

displays: 25%    FALSE //because the systax is incorrect

c.print("Hello world")

displays the message: Hello world TRUE // the syntax is correct here we are printing a messgae of string format

d. print('I am', format(2345.6789, '10,.3f'))

displays the message: I am 2,345.679    TRUE

e.assuming y = 59, print(y)

displays:y //means the value of "y" it displays if u r talking abt y value then its TRUE. else its FALSE

2Which of the following statements about variables are TRUE?

a.payRate is an example of a camelCase variable name //TRUE

18.39 = payRate

b.is a Python statement that creates a variable called payRate and assigns the value 18.39 into it//FALSE

because it is syntactically incorrect while assigning values to literals is not correct

c.when you assign a value to a variable, the variable will reference that value until you assign it a different value //TRUE

d.a variable is a name that represents a value in the computer's memory //TRUE

e,the variables discussed in chapter 2 can hold integers, real numbers, and strings //TRUE

What is/are the result/s of the following Python statement? (Check all that apply)

a = input("How old are you?")

age = int(a)

a.variable a is of type integer    FALSE // it is of type STRING

b.How old are you?

is displayed on the screen //TRUE

c.the value that is returned from the input function is assigned to variable a //TRUE

d.assuming the user entered a value consistent with an integer, the value returned by the int function is assigned to the age variable    //FALSE

e.variable age is of type string // FALSE

f.during the execution of the first statement the program pauses and waits for the user to type something //TRUE