Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 46 pages
Exam (elaborations)

CS 1400 EXAM 2 QUESTIONS WITH VERIFIED ANSWERS

Document preview thumbnail
Preview 4 out of 46 pages

CS 1400 EXAM 2 QUESTIONS WITH VERIFIED ANSWERS

Content preview

CS 1400 EXAM 2 QUESTIONS WITH VERIFIED ANSWERS
Correct 44

Incorrect 00



1
2 f 44

Term



What is the first thing to print in this program?


def display_1():
print("Go Aggies!")


def display_2():
print("Utah State!")


print("School Pride")
display_2()
display_1()



Give this one a try later!

, School Pride To come up with a solution to the
problem


*The functions will not print until To think through the problem
you call them, which happens at
the end of this program. To make coding simpler

range(len(my_list))
Your birthday is in July



*Index is always one off
*will print the length of the list (6)


Don't know?




3 of 44

Term



Mark all that are valid import statements to use a module. You may
assume that all names used are valid.



Give this one a try later!



1
5
3 import mathy

from mathy import calc
*Will print a random integer between
1 and 5

, 12 4




*will run 3 times in j, 4 times in i *Counting by 3 from 1-12
Don't know?




4 of 44

Term



In python, what does a function with no explicit return statement
return?



Give this one a try later!



A convention None object




class Widget:
Pseudocode
pass


Don't know?




5 of 44

Definition



var_4, var_6, var_3, var_7, var_5



Give this one a try later!

, Put the following arguments in the correct spot to produce the output.


The giant captured 12 ducks.

def message(var_1, var_2, var_3):
print("The " + var_2 + " captured " + str(var_3) + " " + var_1 + "s.")


var_4 = "duck"
var_5 = 12
var_6 = "giant"


message(_____, _____, __ )




Put the following arguments in the correct spot to produce the output.


12 hungry hippos tickled the panda

def message(_____, _____, _ ):
print(str(var_3) + " hungry " + var_1 + "s tickled the " + var_2)

var_4 = "panda"
var_5 = "hippo"
var_6 = 12


message(var_4, var_5, var_6)




Put the following arguments in the correct spot to produce the output.


The chickens ate 12 of the 19 donuts.

def message( ____ , var_3, var_1, var_2):
print("The " + var_1 + "s ate " + str(var_2) + " of the " + str(var_3) + " " + var_4 + ".")

var_5 = "chicken"
var_6 = 12
var_7 = 19

Document information

Uploaded on
July 24, 2026
Number of pages
46
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$14.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
GEEKA
3.8
(361)
Sold
2138
Followers
1448
Items
58662
Last sold
10 hours ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions