subject

Question 1(Multiple Choice Worth 5 points) (03.01 MC)

Which line of code will only allow a non-decimal point to be stored in a variable?

candyCost = int(input("How much is the candy?"))
candyCost = input("How much is the candy?")
candyCost = float(input("How much is the candy?"))
candyCost = str(input("How much is the candy?"))
Question 2(Multiple Choice Worth 5 points)
(03.01 MC)

Cheri's teacher asked her to write a program using the input() function. What will this allow her program to do?

Add comments to the code
Allow others to understand the code
Display a string on the screen
Make the program interactive
Question 3(Multiple Choice Worth 5 points)
(03.01 MC)

Jabari is writing a program which prompts a user for a value that is negative and has a decimal. Which function should he use?

float()
int()
print()
string()
Question 4(Multiple Choice Worth 5 points)
(03.01 LC)

In programming, what is a string?

A cable that connects a computer to hardware
A method of threading code into a computer
A system of organizing letters alphabetically
A way to store a sequence of letters, numbers, or symbols
Question 5(Multiple Choice Worth 5 points)
(03.01 LC)

Which function converts the user's input to a number without a decimal?

float()
int()
print()
string()

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 14:30, binodkharal2048
Hi plz 11 ! when planning a table, what step comes first: "define the column headers" or "calculate the number of columns/rows"? a. calculate the number of columns/rows b. define the column headers
Answers: 1
image
Computers and Technology, 24.06.2019 16:00, miner12924owhu4d
5.a fishing rod is formed from a composite material of 0.5 kg of glass fibers embedded in a matrix of 0.5 kg of epoxy resin. the glass fibers are assumed to be long, continuous and unidirectional. to achieve a greater stiffness it is proposed to use a different composite that is comprised of long continuous carbon fibers that will be embedded in a matrix of 0.5 kg of epoxy resin. if the modulus of elasticity of the carbon fiber composite is 10% greater than the elastic modulus of the glass fiber composite, estimate the mass of carbon fibers that will be used to make the carbon fiber composite. assume the applied tensile stress is parallel to the direction of the long axis of the fibers. the epoxy resin, glass fiber, and carbon fiber have an elastic modulus of 5, 86, and 350 gpa respectively and a density of 1100, 2500, and 1800 respectively.
Answers: 3
image
Computers and Technology, 24.06.2019 18:00, bloop3r
Why is a multiview sketch drawinf different from other sketches like isometric, two point, and oblique
Answers: 1
image
Computers and Technology, 24.06.2019 20:00, diangeloortiz
Which element will you include to present numerical on a slide? a: graph b: text c: flowchart d: shapes
Answers: 1
You know the right answer?
Question 1(Multiple Choice Worth 5 points) (03.01 MC)

Which line of code will only all...

Questions in other subjects: