Chapter 2

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

Which mathematical operator is used to raise 5 to the second power in Python?

**

What is the output of the following command, given that value1 = 2.0 and value2 = 12 print (value1 * value2)

24.0

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

68

What is the output of the following print statement? print 'I\'m ready to 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.

The line continuation character is a

\

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

a quote mark ("")

The python turtle is initially positioned in the ___ of a graphics window and it first appears, by default, to be heading ___

center, east

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

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

float

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

flowchart

To use Python's turtle graphics, you must include which of the following statements in your program?

import turtle

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 ( )

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

input ( )

Which of the following will display 20%

print(format(0.2 , '.0%)) <enter>

What is the informal language, used by programmers to create models of programs, that has no syntax rules and is not meant to be compiled or executed?

pseudocode


Set pelajaran terkait

LWC1 Chapters 39,40,41 Sample Test Questions

View Set

Chapter 18 Management of pts with upper respiratory tract disorders

View Set

Fundamentals: Chapter 19: Implementing Nursing Care

View Set