Question

I. For problem 1-10 enter the letter of the word that best matches the definition 1)...

I. For problem 1-10 enter the letter of the word that best matches the definition

1) _____ In the statement computerPick = “rock”, the = (equal sign) means                               a) number

2) ____ randint in Python is an example of a Python package function and requires an            b) type

                 ______ statement at the beginning of your program.                                                      

3) ____ The passed arguments in calling a function must match the parameters                        c) parenthesis

defined in the function in all 3 of these: position, type, and ____ of arguments

                                                                  

4) ____ An input validation loop prevents against ______                                                          d) assignment                

5) ____ A Case statement (switch) logic is not available in Python but Python can

              create the same logic with _____                                                                                       e) plus sign

               

6) ____ In a while <condition>loop this must change in the body of the loop to avoid an

              infinite loop.                                                                                                                      f) import

              

7) ____ In Python, an assignment statement sets the ______ of a variable                                 g) GIGO

8) ____ The book append function to put two strings together in Python is just a simple           h) the condition

9) ____ The Python statement, letterGrade=getLetterGrade(numericGrade), the variable

               letterGrade is assigned the ______ value from the getletterGrade function.                  i) if logic

               

10) ___ Order of operation in a formula or condition can be specified by                                  j) return

Homework Answers

Answer #1

1) assignment // "rock" is assigned to the variable

2) import //packages are imported using import keyword

3) number //number of arguments passed in a function must be same as defined

4) GIGO //This prevents the Garbage/Useless flow of data in Loop

5) if logic //if logic is equivalent to switch

6) the condition //condition is the only thing that prevents the while loop to be infinite, so it must change

7) type //in python we don't have to worry about type of variable, it is automatically assigned

8)  plus sign //string can be appended with plus sign like simple adding

9) return // the return value of the function represents the value of the function when it called again

10) parenthesis //paranthesis can form an order by forming pairs of varibles

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1) Consider the following Java program, which one of the following best describes "setFlavor"? public class...
1) Consider the following Java program, which one of the following best describes "setFlavor"? public class Food {     static int count;     private String flavor = "sweet";     Food() { count++; }     void setFlavor(String s) { flavor = s; }     String getFlavor() { return flavor; }     static public void main(String[] args) {         Food pepper = new Food();         System.out.println(pepper.getFlavor());     } } a. a class variable b. a constructor c. a local object variable d....
I NEED TASK 3 ONLY TASK 1 country.py class Country:     def __init__(self, name, pop, area, continent):...
I NEED TASK 3 ONLY TASK 1 country.py class Country:     def __init__(self, name, pop, area, continent):         self.name = name         self.pop = pop         self.area = area         self.continent = continent     def getName(self):         return self.name     def getPopulation(self):         return self.pop     def getArea(self):         return self.area     def getContinent(self):         return self.continent     def setPopulation(self, pop):         self.pop = pop     def setArea(self, area):         self.area = area     def setContinent(self, continent):         self.continent = continent     def __repr__(self):         return (f'{self.name} (pop:{self.pop}, size: {self.area}) in {self.continent} ') TASK 2 Python Program: File: catalogue.py from Country...
1) Consider the following Java program. Which statement updates the appearance of a button? import java.awt.event.*;...
1) Consider the following Java program. Which statement updates the appearance of a button? import java.awt.event.*; import javax.swing.*; public class Clicker extends JFrame implements ActionListener {     int count;     JButton button;     Clicker() {         super("Click Me");         button = new JButton(String.valueOf(count));         add(button);         button.addActionListener(this);         setSize(200,100);         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         setVisible(true);     }     public void actionPerformed(ActionEvent e) {         count++;         button.setText(String.valueOf(count));     }     public static void main(String[] args) { new Clicker(); } } a. add(button);...