71.2k views
3 votes
Name:

Computer Science
Modified
Python Coding Section C
Directions: Circle the best answer.
1. If the code below, what is the maximum amount of gold that can be in a treasure chest?
def treasure_chest():
gold = random.randint (1, 10)
print ("the treasure chest contains", gold, "pieces of gold.")
#Main program begins here
import random
player_gold = 5
print("There is a treasure chest here.")
treasure_chest()
+ None
C. Five
b. One
d. Ten
2. What is the output of this program?
def say_hello() :
print("Hello World)
say_hello)
say_hello
a. Hello world! Hello world!
b. "Hello World" "Hello World!"
C. Hello Hello
# None of the above

Name: Computer Science Modified Python Coding Section C Directions: Circle the best-example-1
User Jon Magnus
by
5.1k points

1 Answer

3 votes

Answer:

The max Number would be D. TEN

Step-by-step explanation:

Where it say the main program begins is where the use of import random is be using under the treasure chest function basicly the random.randint choose and random number between 1 through to 10..

User Gcasar
by
5.5k points