If the input for the below equation is ‘Bob’, what will be the output?

PROGRAMMING 1 FUNCTION CHALLENGE Period 3-1

Quiz
•
Computers
•
10th - 12th Grade
•
Easy
MANAL FAWAZ
Used 2+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Bob * 3
Cannot multiply a string
BobBobBob
Error: ‘x’ is not defined
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What does the below program print?
8
4
-32
Error
3.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
def say_hi( first_name=“Mary” , last_name):
-->print(“hi “ + first_name + “ ” + last_name)
say_hi(“Rebecca” , “Rogers”)
Why will the following program not print?
The name Rebecca doesn’t match the name Mary
The first_name and last_name is not properly defined
There is no default argument after the first default argument
There is a missing quotation
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
The except part of the function doesn’t return the statement
True is not defined
There are too many parentheses
The “if” statement should have greater than and an equal sign
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Why do programmers use try and except statements when their code might throw an exception?
So that the programmer can disregard the exception and do what they want within the code
In python it is a requirement to use try and except statements when their code might throw an exceptions
Top print out a proper error statement for the user
Exceptions are used when there are try and except statements.
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What are exceptions used for?
To state that something has gone wrong in the code
To tell the user that the data they gave isn't suitable for the code, (the code asked for an integer and they gave a string)
To allow the programmer to write and develop code that isnt sophisticated, but still run smoothly.
7.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
23
67
99
92
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Error Handling

Quiz
•
12th Grade
15 questions
Java Fundamentals

Quiz
•
12th Grade
10 questions
Python Review - Functions

Quiz
•
9th - 12th Grade
8 questions
Lesson 1 Creating a Simple Webpage

Quiz
•
10th Grade
13 questions
BTEC Level 3 - Unit 1 - Topic 5 (Validating Data)

Quiz
•
12th Grade
13 questions
Python Functions

Quiz
•
9th - 12th Grade
10 questions
Java Exceptions

Quiz
•
11th - 12th Grade
9 questions
Python Lists

Quiz
•
7th - 11th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Computers
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
20 questions
Distance, Midpoint, and Slope

Quiz
•
10th Grade
20 questions
Figurative Language Review

Quiz
•
10th Grade
20 questions
Understanding Linear Equations and Slopes

Quiz
•
9th - 12th Grade