COSC 1336 - Chapter 2 Quiz

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Which mathematical operator is used to raise five to the ''Second POWER'' in python?

**

If value1 is 2.0 and value2 is 12, what is the output of the following command? print (value1 * value2)

24.0

After the execution of the following statement, the variable price will reference the value ________. price= int(68.549)

68

According to the behavior of integer division, when an integer is divided by an integer, the result will be a float.

False Why: ...

Python formats all floating-point numbers to two decimal places when outputting using the print statement.

False Why: ...

In Python, math expressions are evaluated from left to right, no matter what the operators are.

False why: ...

The output of the following print statement is: print'I\'m readyto begin

I'm ready to begin

What is the output of the following print statement? print ( 'The path is D:\\sample\\test.' )

The path is D:\sample\test.

A flowchart is a tool that programmers use to design programs.

True

Comments in Python begin with the # character.

True

Computer programs typically perform three steps: Input is received, some process is performed on the input, and output is produced.

True

In Python, print statements written on separate lines do not necessarily output on separate lines.

True

Python allows programmers to break a statement into multiple lines.

True

The \t escape character causes the output to skip over to the next horizontal tab.

True

When using the camelCase naming convention, the first word of the variable name is written in lowercase letters and the first character of the second and subsequent words are written in uppercase letters.

True

The line continuation character is a(n) ________.

\

In a print statement, you can set the ________ argument to a space or empty string to stop the output from advancing to a new line.

end

The program development cycle is made up of ________ steps that are repeated until no errors can be found in the program.

five

After the execution of the following statement, the variable sold will reference the numeric literal value as a(n) ________ data type: sold = 256.752

float

A(n) ________ is a diagram that graphically depicts the steps that take place in a program.

flowchart

The ________ built-in function is used to read a number that has been typed on the keyboard.

input

The ________ function reads a piece of data that has been entered at the keyboard and returns that piece of data, as a string, back to the program.

input

What type of error produces incorrect results but does not prevent the program from running?

logic

What is the informal language that programmers use to create models of programs that have no syntax rules and are not meant to be compiled or executed?

pseudocode

What symbol is used to mark the beginning and end of a string?

quotation


Set pelajaran terkait

Chapter 1 Pre-Work/Quiz CIST-004A

View Set

8. The Berlin Blockade (Cold War)

View Set

Chapter 36- abdominal and Genitourinary trauma

View Set

과목 3 수렵도구의 사용법 / 1종: 평가영역 1 수렵용 총기에 대한 기본

View Set