Rambo
This page lists questions and answers that were posted by visitors named Rambo.
Questions
The following questions were asked by visitors named Rambo.
Tickets to a show cost$10 in advance and $15 at the door. If 120 Tickets were sold for a total of $1390, how many of the tickets were bought in advance?
13 years ago
Function parameters are like ___, but the function caller sets their value. operators conditionals None of the above variables
2 years ago
What data type determines the loop-continuation condition? bool float str int
2 years ago
What would be a good initial value for a score in a game? 1 None of the above 100 0
2 years ago
To get the number of items in a list, we use the ___ function. list() len() int() size()
2 years ago
Python's ___ operator evaluates to True whenever both conditional expressions are True. not and either or
2 years ago
Counter-controlled repetition with a for loop uses the ___ function. counter() range() while() loop()
2 years ago
The ___ data structure maps a key to a value. map dict list str
2 years ago
What function allows us to get a random item from a list? randint() choice() range() random()
2 years ago
What data structure stores items in key/value pairs? list def dict str
2 years ago
How do we get a random key from a menu_items dict using the random module's choice() function? random_menu_item = choice(menu_items.keys()) random_menu_item = choice(menu_items.items()) random_menu_item = choice(menu_items) random_menu_item = choice(menu_...
2 years ago
What is the name of the user-defined function present in the following code snippet?* import random def test(): print("hello world") randomNumber = random.randint(1, 10) length = len("This is cool") print(randomNumber, length) test() test random randint l...
2 years ago
Which choice creates a list of foods?* foods = {"banana", "apple", "burrito"} foods = ["banana", "apple", "burrito"] foods = ("banana", "apple", "burrito") None of the options
2 years ago
Which logical operator are we using in the following code snippet?* age = 15 if age > 12 and age < 20: print("You are a teenager.") and < > =
2 years ago
What is the index number of "tacos" in this list:* foods = ["tacos", "burritos", "nachos"] 1 0 3 2
2 years ago
Which code sample correctly uses string interpolation to insert the variable `favorite_food` into a string?* f"My favorite food is {favorite_food}" "My favorite food is {favorite_food}" f"My favorite food is [favorite_food]" "My favorite food is (favorite...
2 years ago
What is the main goal of a debate?(1 point) Responses to learn about a topic to learn about a topic to reach a consensus to reach a consensus to contribute information to contribute information to present a winning argument
2 years ago
100 3/2 as product of identical factors submit answer in simplified form
2 years ago
what does the indicative mood express? hypothetical statements causes and effects wishes and desires factual statements
2 years ago
The origin and wave of political independence that swept across Africa first began in the (1 point) Responses 1950s. 1950s. 1960s. 1960s. early 1960s. early 1960s. 1970s.
2 years ago
Which sentence contains both a noun phrase and a verb phrase?(1 point) Responses He sat on my grandmother’s favorite armchair. He sat on my grandmother’s favorite armchair. The pigeons have not landed on my neighbor’s balcony in a long time. The pigeons h...
2 years ago
If you have to pay your car insurance deductible, which is the best place to get the money?(1 point) Responses your emergency fund your emergency fund your insurance company your insurance company your credit card your credit card your family
2 years ago
Based on Kepler's observations about planetary motion, what is the relationship between a planet's orbital velocity and its distance from the sun?(1 point) Responses The greater the distance, the greater the orbital velocity. The greater the distance, the...
2 years ago
Use the paragraph to answer the question. Dogs need a lot of training and attention when they are puppies. Nevertheless, they make amazing companions for life. What is the distinction? (1 point) Responses The writer introduces two steps in a process to sh...
2 years ago
How do you say y ≥ -5 ?
2 years ago
Which number is a solution to the inequality x > -3?
2 years ago
What is denotative meaning as defined in our class? (Hint: Look at 8/30 slides) * 1 point Having a direct, specific meaning Discovering a long lost treasure Using textual evidence Reading a book
2 years ago
Which is not a factor contributing to poverty in Africa? (1 point) Responses long periods of drought and desertification long periods of drought and desertification a sudden decline in unemployment a sudden decline in unemployment drastic increase in popu...
2 years ago
Which features help readers create an outline as they take notes?(1 point) Responses connections and distinctions connections and distinctions headings and subheadings headings and subheadings figures and tables figures and tables multimedia and graphics
2 years ago
How can a planetary nebula be identified? Select the two correct answers.(1 point) Responses spherical shape spherical shape diffuse edges diffuse edges dark area dark area central star remnant
2 years ago
What is the purpose of a concluding section? Select the two correct answers.(1 point) Responses to explain how the author arrived at their central point to explain how the author arrived at their central point to introduce a few additional interesting fac...
2 years ago
Which defines a bank as used in finance? (1 point) Responses the land alongside or sloping down to a river or lake the land alongside or sloping down to a river or lake a financial institution where customers deposit money, withdraw previously deposited m...
2 years ago
A high school credit is (1 point) Responses when a teacher offers extra points for additional optional work. when a teacher offers extra points for additional optional work. a unit awarded for passing courses. a unit awarded for passing courses. when you...
2 years ago
According to astronomers, how many galaxies are distributed across the observable universe?(1 point) Responses 100 billion 100 billion 1 trillion 1 trillion several thousand several thousand 50
2 years ago
Answers
The following answers were posted by visitors named Rambo.
Just don't hate on us going to Jiksha and we can still learn from being given the answers. As long as we understand the lesson after this and get that A+ we gucci
4 years ago
Tysm bro
3 years ago
To send a value out of a function, you use the ___ keyword. return def if send
2 years ago
Functions allow us to reduce repetition to follow the ___ principle. D.E.F. D.R.Y. D.I.Y. D.R.I.
2 years ago
You use the ___ keyword to create a function. create def fun if
2 years ago
Function ___ allow functions to take in a value from the function caller. values variables parameters definitions
2 years ago
What is the standard indentation amount in function definitions? 4 spaces 2 spaces 3 spaces 0 spaces
2 years ago
A while loop runs until a boolean condition becomes ___. True bool None False
2 years ago
What type of looping did we cover today? determinate definable indefinite continuous
2 years ago
The boolean condition that controls a while loop is called the loop-___ condition. continuation interpretation situation determination
2 years ago
What are the two types of looping in computer programs? definite and indefinite definable and indefinable infinite and determinate continuous and halting
2 years ago
Python's while loop is generally used to perform ___ looping. continuous determinate definable indefinite
2 years ago
An infinite loop happens when the boolean condition that controls a while loop never becomes ___. bool None False True
2 years ago
What would be a good initial value for a score in a game? 1 None of the above 100 0
2 years ago
Variables that track important data in a game are known as game ___. variables state scores loops
2 years ago
How can we represent the value of dice (or coin faces) in Python? None of the above Using bool values Using random numbers Using images
2 years ago
What function did we use to simulate rolling dice in today's app? print() float() input() int()
2 years ago
___ is whether a number is even or odd. Equity Rarity Parity Arity
2 years ago
How did we use the D.R.Y. principle in this lesson? We generalized repetitive code by moving it into a function. We removed the game loop to reduce repetition. We didn't use the D.R.Y. principle in this lesson. We removed buggy logic from our program.
2 years ago
The function is_logged_in() is an example of a ___. Boolean helper function Expression helper function Refactoring helper function Debugging helper function
2 years ago
How did we use refactoring in this lesson? We removed code from functions and put it into the main program area. We debugged a broken project and fixed it. We moved complicated logic into functions and tried to follow the D.R.Y. principle. We didn't use r...
2 years ago
Why do we need refactoring? Because it is required. It helps the computer to read our code. We don't need refactoring. It helps other programmers (or our future selves) work with our code.
2 years ago
Which sentence best-describes the process of refactoring? None of the above. A way to debug. A way to improve the structure and readability of your code. A way to make your code easier for the computer to read.
2 years ago
___ helper functions make a boolean expression into a named function. Expression Debugging Boolean Refactoring
2 years ago
To add items to a list, you can use ___. list.add() list.put() list.in() list.append()
2 years ago
In Python, you generally use a list to hold ___ items. zero single multiple two
2 years ago
A list is known as a ___ structure. code data list storage
2 years ago
The ___ operator let's you test if an item is contained in a list. list == in =
2 years ago
___ are special functions that allow you to manipulate a list through dot notation. Functions Data Methods Structures
2 years ago
Today, we learned how to use ___ conditional statements. simple complex big multiple
2 years ago
Python's ___ operator evaluates to True whenever either conditional expression is True. either and or not
2 years ago
___ data entered by a user ensures your program behaves as you expect it to. Creating Storing Removing Validating
2 years ago
Use the ___ operator to get the remainder after division. % // / \
2 years ago
The > operator is an example of a ___ operator. comparison logical complex boolean
2 years ago
A ___ loop is generally used to perform definite repetition. for slow fast while
2 years ago
When you build a list from another list, the technique is called a ___. building cloning wrapping mapping
2 years ago
The step-by-step approach we used to search through lists with a for loop today was called an ___. algorithm logarithm aphorism syllogism
2 years ago
Definite loops run for a ___ number of times. predicated preferred prehistoric predetermined
2 years ago
If we want to loop through a list of foods, how would we do it with the for loop? for foods: # do something with the food for food in foods: # do something with the food for foods in foods: # do something with the food for foods in food: # do something wi...
2 years ago
___ must be unique in a dict. keys indices values lists
2 years ago
How would we determine if the item "tacos" was in a menu dict? if "tacos": # do something if menu in "tacos": # do something if "tacos" in menu: # do something if in menu "tacos": # do something
2 years ago
What is the correct syntax to access the value (the taco's price) that the key "tacos" references in a menu dict? taco_price = menu[tacos] taco_price = menu{"tacos"} taco_price = menu[taco_price] taco_price = menu["tacos"]
2 years ago
Which line below shows how to loop through a menu dict's key/value pairs (the key is the menu item and the value is the price of the item)? for price, item in menu.items(): # do something with the item and price for item price in menu.items(): # do someth...
2 years ago
How would you update the price of a taco to be 4.50 in a menu dict? Assume the key is the item name and the value is the item's price. tacos[menu] = 4.50 menu[tacos] = 4.50 menu[4.50] = "tacos" menu["tacos"] = 4.50
2 years ago
What data structure did we use to represent the three valid choices in today's project? dict list variable str
2 years ago
What keyword is used to create a function in Python? if def fun str
2 years ago
What keyword is used to exit a loop? end continue exit break
2 years ago
The ___ loop is useful for indefinite looping. forever def while for
2 years ago
The ___ loop is used to loop over a list for while forever def
2 years ago
Given a users dict that maps usernames to email addresses, how would you get the email address for the user djs? email_address = users[0] email_address = users{"djs"} email_address = users["djs"] email_address = users("djs")
2 years ago
How do you increment the value stored in a variable called score by 1? score++ score += 1 1 += score score+
2 years ago
How do we get a random key from a menu_items dict using the random module's choice() function? random_menu_item = choice(menu_items.keys()) random_menu_item = choice(menu_items.items()) random_menu_item = choice(menu_items) random_menu_item = choice(menu_...
2 years ago
What dict method lets you loop through both the key and the value of the dict in a for loop? dict.keys() dict.get() dict.items() dict.values()
2 years ago
Which of the following methods gets the keys from a dict and lets you use them like a list? dict.choices() dict.val() dict.convert_to_list() dict.keys()
2 years ago
How do we get a random key from a menu_items dict using the random module's choice() function? random_menu_item = choice(menu_items.keys()) random_menu_item = choice(menu_items.items()) random_menu_item = choice(menu_items) random_menu_item = choice(menu_...
2 years ago
What does DRY stand for?* Don’t Repeat Yourself Do Repeat Yourself Don’t Recall Yourself Don’t Revise Yourself
2 years ago
What is the output of the following code snippet?* def say_something(): print("I said something") def print_something(): print("I printed something") print_something() I said something I printed something I said something I printed something None of the o...
2 years ago
Which of the following built-in functions returns the length of a list?* length() min() len() max()
2 years ago
Which of the following is not a relational operator?* >= != == +=
2 years ago
8. In the following code snippet, what should go in the ___ to loop through the `users` list?* users = ["Daniel", "Ivann", "Natalie", "Kevin"] for user in ___: print(users) user users list None of the options
2 years ago
Write a Python program based on these instructions:* Create a `Funny Nickname` app. This app should ask the user for their first name and then create a nickname in the form "[nickname] [first_name]" Hints: - Import the function to choose a random item fro...
2 years ago
Write a Python program based on these instructions:* Create a program that prompts a user to repeatedly guess a number. Keep a tally of how many guesses it takes them to guess the number. Once they guess the number, tell them how many guesses it took and...
2 years ago
If we have a list named colors, which of the following gives the length of the list?* colors.length() len(colors) colors.len() length(colors)
2 years ago
What is the output of the following code snippet?* for num in range(5): print(num) 1 2 3 4 5 0 1 2 3 4 5 1 2 3 4 0 1 2 3 4
2 years ago
Which keyword is used to create a function in Python?* function def define fun
2 years ago
Which keyword is used to send data out of a function?* push return send take
2 years ago
Which operator is used to multiply two numbers?* % / * &
2 years ago
Find & fix the syntax error(s) in the following code:* fruits = [ "Apple", "Banana", "Orange" "Watermelon ] for fruit from fruits print(fruit))
2 years ago
Write a Python program which:* - Creates a function called `add()` that takes two parameters: `num1` and `num2`. - Return the sum of the numbers from the `add()` function. - Prompts the user for number 1 and stores their response in a variable - Don't for...
2 years ago
Write a Python program that:* - Prompts a user for a number and stores the response in a variable called "user_number". - Make sure to convert the user input to the correct data type. - Multiplies the user's number by 10 and stores the result in a variabl...
2 years ago
Write a Python program that:* - Stores animal names in a list and then prints all of the values inside it using a `for` loop. - You should have at least 4 animal names in your list. - After the loop, display the total number of animals in the list. - You...
2 years ago
Which of the following is the correct syntax to define a dictionary:* user_details = { "djs", "admin" } user_details = { "username": "djs", "role": "admin" } user_details = [ "username": "djs", "role": "admin" ] user_details = { "username", "djs" : "role"...
2 years ago
Which function is used to remove an item from a dictionary?* dict.remove() dict.delete() dict.pop() dict.destroy()
2 years ago
Which function is used to get all of the keys from a dictionary?* dict.keys() dict.values() dict() None of the options
2 years ago
Which of the following is a data structure?* int list float bool
2 years ago
Which data type is returned by the `input()` function?* str int float It depends on what the user enters when they respond to the `input()` function
2 years ago
What is the index number of "tacos" in this list:* foods = ["tacos", "burritos", "nachos"] 1 0 3 2
2 years ago
What is the index number of "steve" in this list:* users = ["daniel", "jim", "steve"] 2 3 4 0
2 years ago
Write Python program which checks if a user is in the correct height range to ride a roller coaster. You should:* - Create a function called `check_height()` - It should take one parameter,`height`, which is a float - In the `check_height()` function: - I...
2 years ago
Which example imports the `randint()` function from the `random` module?* from random import randint() from randint import random from random import randint from randint() import random
2 years ago
Which data structure stores items in key/value pairs?* dict list str bool
2 years ago
Which value represents a `bool`?* 0 {} True []
2 years ago
40. Would the following code print something?* num = 5 if num == 0 or num == 1: print("The number is 0 or 1") Yes, it prints the following text: "The number is 0 or 1" No, there's an error so an error message would be displayed
2 years ago
Write a Python program that:* - Creates an empty list called `favorite_foods`. - Creates a loop that runs three times. - In the loop: - Prompt the user for their favorite food - Add the user's response to the `favorite_foods` list - After the loop, use an...
2 years ago
Write a Python program which:* - Creates a variable to hold an `admin_username` with whatever username you wish. - Creates a variable to hold an `admin_password` with whatever password you wish. - Prompts the user for a `username`. - Prompts the user for...
2 years ago
Find & fix syntax error(s) in the following code:* meaning_of_life == input(What is the meaning of life? ) if meaning_of_life = programming print("That's correct!) else: print("That is incorrect, try again!")
2 years ago
Write a Python program that:* - Creates a list of `wizards` with these values: - "Daniel", "Sam", "Sahib", "Ivann" - Prompts the user to guess a wizard's name - Store their response in a variable called `wizard_name` - If the user guesses a wizard in your...
2 years ago
What is the main goal of a debate?(1 point) Responses to learn about a topic to learn about a topic to reach a consensus to reach a consensus to contribute information to contribute information to present a winning argument
2 years ago
What is a collegial discussion?(1 point) Responses a type of project where each student has a specific assigned role a type of project where each student has a specific assigned role a mutually respectful conversation between students in a classroom a mut...
2 years ago
What kind of question can be used to help propel a collegial discussion?(1 point) Responses a question that can be answered by looking up a fact a question that can be answered by looking up a fact a question that changes the topic of the discussion a que...
2 years ago
What is empathy?(1 point) Responses understanding others’ feelings even if you do not agree understanding others’ feelings even if you do not agree learning about others’ feelings even if you do not understand them learning about others’ feelings even if...
2 years ago
Thanks
2 years ago
you're wrong
2 years ago
you're still wrong
2 years ago
1. How long would it take to fly a jet to the Sun from earth? 18 years 18 hours 1 year 24 hours
2 years ago
2. Which of the following is correct about Sirius? It is the brightest star in the night sky. It is not as bright as Canopus. It can only be seen with a telescope. It is smaller than our sun.
2 years ago
Use this table to answer questions about the spectral features of each of the stars: Sirius has a temperature of 9,940K. Using the table above, what spectral features does Sirius have? Helium, some hydrogen Strong hydrogen, some ionized metals Hydrogen an...
2 years ago
How far away from Earth is Kapteyn's Star? 38 light years 20 light years 13 light years 1 light year
2 years ago
5. It is a spectral type M star. Using the table above, what spectral features does Kapteyn's Star have? Helium, some hydrogen Strong titanium oxide and some calcium Hydrogen and ionized metals such as calcium and iron Both metals and ionized metals, espe...
2 years ago
What kind of star is Luyten's star? red dwarf red giant white dwarf neutron star
2 years ago