banner



4.2 Code Practice Question 2

Python Crook Canvass
Earsketch
Earsketch Tutorial
Online Python Compiler
Digital Textbook
Python Lawmaking Visualizer
100 Days of Code

Nov ii

Next is Assignment 9: Matrices. In math, a 2D list or array of numbers is chosen a matrix (matrices plural). Create and initialize a v x v second listing to lucifer the matrix below.

0 two 0 0 0
0 ii 0 0 0
0 2 2 0 0
0 two 0 ii 0
0 2 0 0 2

Nov one

Now nosotros volition endeavour 9.six Animative with 2D Lists. As we've seen earlier, tracing code allows us to think through the steps in a programme and predict the outcome without really running the program. Not only tin can tracing code assistance u.s. discover errors in our own code, merely it too helps us sympathize code written by another person. In this lesson, we will make changes to the programme we looked at in the last lesson so that we can produce a simple animation.

Apply the programming environment on the 9.six Lesson Folio to write code for a digital paradigm of your choosing. You can use the code we learned in Lesson 9.6 equally a foundation. Open a NotePad file and paste in the code from Lesson 9.6, so open the html color picker and add together additional colors. Paste your code into the 9.half dozen surroundings and run it.
When you're ready to start coding, return to Lesson 9.6 and brainstorm writing your code in the programming environment there. Add colors, movement, and elements of your choosing. One time yous've got an animation yous're happy with, save and re-create your lawmaking in your Yard-Bulldoze. Then, share your program with me here.

October 31

Use the programming environs on the nine.v Lesson Page to write code for a digital image of your choosing. You tin use the lawmaking we learned in Lesson 9.v as a foundation. Open a NotePad file and paste in the lawmaking from Lesson ix.5, then open the html color picker and add additional colors. Paste your code into the nine.5 environment and run it.
When you lot're ready to get-go coding, return to Lesson 9.5 and brainstorm writing your lawmaking in the programming environment there. Add colors and elements of your choosing. Once you've got an epitome you're happy with, save and copy your code in your G-Drive. Then, share your programme with me here.

Oct 28

We finish the week with Quiz 9. The access lawmaking is bamboo. And so we volition motion to 9.four Algorithms with 2nd Lists In this lesson, nosotros're going to learn how to use for loops to process 2D lists. In this example, we'll demand two for loops: one to handle the rows, and 1 to handle the columns.

October 27

We will pick up with nine.2 Code Exercise. Then we will motility to 9.3 Loops with 2D Lists In this lesson, we will code various algorithms that tin work with 2D lists. The lawmaking nosotros create volition allow users to create various-sized 2nd lists, make full a second list with random numbers, bandy rows in a 2nd list, bandy columns in an 2d list, and sum upwards the values in a cavalcade of the 2D list. By using functions and parameters, users can easily target the specific rows, columns, or sizes of second lists that they would like to work with.


Oct 26

Today we will take Test eight. Then we will move to nine.1 What is a 2D List? In Unit 9, we're going to cover ii-dimensional lists. Nosotros tin can use 2nd lists to shop information that is organized in a filigree or a tabular array.

Oct 25

Today is Assignment 8: Birthday Organizer. In this program, you volition create a birthday organizer. You volition ask the user for the name of a person and the month they were born, along with the day and twelvemonth they were born. If the user incorrectly enters i of those values, a default value is gear up instead. The user can do this for equally many friends equally they would like. This assignment is worth 20 points, so you volition take to debug every bit best you tin can before you submit it.

October 24

Next is 8.ten Writing a Simple Sort. In this lesson, yous will larn to write a simple sort and the basics of how to rearrange information in a list.

Oct 20

The Whale Listing

Become to List Items - Data Types. Copy the lawmaking below and paste it into the Try Information technology Yourself window. Then add the lawmaking in the paradigm and run information technology.

name = ["whale1", "whale2", "whale3", "whale4", "whale5", "whale6", "whale7", "whale8", "whale9", "whale10", "whale11", "whale12", "whale13", "whale14", "whale15", "whale16", "whale17", "whale18", "whale19", "whale20", "whale21", "whale22", "whale23"]

x = [-67.43928,-68.51367,-68.4956,-67.9487,-63.41219,-63.2847,-63.44392,-63.26444,-62.21766,-62.68708,-62.14266,-61.43989,-61.64667,-61.30743,-61.15596,-61.10747,-61.23049,-61.21565,-61.04606,-61.0237,-61.24702,-61.0493,-lx.91662];

y = [48.83191,48.67595,48.70041,48.81702,48.64912,48.57189,48.39717,48.40019,48.3109,48.37088,48.04738,48.09392,48.02449,48.07909,48.14254,48.08245,48.34054,48.01869,48.04373,47.91508,48.18848,47.83466,47.35136];

Whale Listing

October 19

We go on with viii.8 Sorting and Searching. In this lesson, we'll have another look at algorithms and become introduced to two of the most important algorithms used in computer programming: searching and sorting. Subsequently this lesson, you'll be prepared to write your own programs that include searching and sorting algorithms in the next two lessons.

What is an algorithm and why should you care?

A guessing game

Sorting

Selection Sort Pseudocode


Oct 17

Nosotros begin the week with 8.5 Listing Methods. In this lesson, nosotros'll acquire several of the basic methods that deal with lists in Python. Then we can accept Quiz 8. The access code is thunder.

Oct 14

Next in Unit 8 is 8.three Element vs Index. In this lesson, we'll look at how to populate a list with random numbers. We'll as well learn how a list index is related to list values, and nosotros will practice using a single line of lawmaking to declare and fill, or initialize, a list.



Oct 13

We start Unit 8 with 8.1 What are Lists?. In this lesson, we'll learn about a new type of variable chosen a list. Equally we'll run into, lists are variables that contain more than than one piece of data.


October eleven

We will start today with 7.6 Tracing Lawmaking. In this lesson, we volition expect at how nosotros can trace the executable steps of a plan to predict what it does, determine potential errors, and expose whatsoever limits the program has in its execution. This will make us even ameliorate at debugging and evaluating our lawmaking. And then we will start Consignment 7: Calendar . For this assignment, you will create a agenda program that allows the user to enter a day, month, and year in iii carve up variables.

Oct ten

We begin Term 3 with 7.5 Using Several Functions. In this lesson, we'll take a look at how several functions tin can be used together. We volition practice coding examples to see how several functions can exist used together to create a desired issue.

Oct vi

We begin today with Quiz seven. Then we will starting time vii.4 Returning Values. In this lesson, we will revisit strings from earlier in the class, and expect at a variety of functions that can be applied to strings. Nosotros'll also learn how Python returns values from a role.


Oct 5

We will move on to 7.ane What Are Functions?. In this lesson, we volition exist learning virtually functions (or subprograms), and how to create them. The terms "function" and "subprogram" denote the same thing. First, we review some common functions nosotros've already used to empathise how these simplify code writing.

Oct four

Now that you've submitted your code, it's fourth dimension to reflect on your piece of work. Reflection is an essential part of reckoner programming, considering it allows u.s.a. to look back on areas nosotros are proud of, identify areas of growth, and celebrate the piece of work we've washed. After reflecting on your program, you'll likely know things you want to do differently the next fourth dimension you start coding.
Answer the Reflection Questions by writing directly in a Google Doc. Make sure that you upload the completed questions in the submission link so that I can grade them. The reflection questions are worth 5 points out of 20 total points for this assignment. And then nosotros will have Examination half-dozen. The admission code is radio.

Sep 29-xxx

Now we become to Unit 6 Assignment: Animation, you will create a complex animation using the simplegui module in Python. Your animation should include various components that tie in everything you've learned in this unit.
This consignment is worth 20 points. ten points will be earned based on the quality of the code you write, five points will be earned for successfully submitting a storyboard that outlines your plan for the animation, and v points will be earned for submitting a reflection on your work.
Below, read over the consignment description and begin to imagine what your blitheness could portray.

5 circles
5 polygons
5 line commands
ii for loops
ane global variable
This will probably have more than one 24-hour interval.

Sep 28

For the Unit of measurement 6 Assignment: Animation, y'all will create a complex animation using the simplegui module in Python. Your blitheness should include various components that tie in everything you lot've learned in this unit.
This assignment is worth 20 points. 10 points will be earned based on the quality of the code you write, 5 points volition be earned for successfully submitting a storyboard that outlines your programme for the animation, and 5 points will be earned for submitting a reflection on your work.
Beneath, read over the consignment description and begin to imagine what your animation could portray.

v circles
v polygons
five line commands
2 for loops
1 global variable
This will probably take more than one twenty-four hour period.

Sep 27

Next we accept on 6.8 Animation. Nosotros've all played video games, which are a perfect instance of how far we've come with computer animation. Underneath all of that activity is lawmaking - lots and lots of it. To make everything work correctly, we need to outset with variables. Let's learn more about basic animation using Python.

Sep 26

Today we will accept Quiz half-dozen. The admission lawmaking is bagel. Then we off to Today we volition take half-dozen.7 Emojis. We meet these little graphics every day, and accept for granted how they're created. Everything nosotros see needs to exist created by someone. In this lesson, that "someone" is you! Nosotros'll look at how to create an emoji in Python, and then yous'll create your ain.

Sep 22

Now we will work with 6.6 Circles. The sail.draw_circle() office is similar to what you've already done with the canvas.draw_polygon() and canvas.draw_line() commands: it'south just a different shape. Y'all will observe these commands very helpful as you go along to piece of work with graphics in your programs.

Sep 21

Now we larn to Draw a House. In this lesson, we're going to combine some of the drawing commands that we learned before, and use them to create a rough sketch of a house. After you sympathise the basics, you will take the code that Dana uses and add together new items to create a house of your own in this lesson'south Code Do.

Sep twenty

Nosotros continue with half-dozen.4 Lines. One of the most basic graphics that you lot will come beyond is a elementary line. While it is a basic graphical element, information technology'southward still a little more involved than cartoon a line on a piece of paper. Where does the line starting time? Where does it finish? What color is information technology? In this lesson, nosotros'll show you how easy drawing a line can be. We will also exercise an consignment in Google Classroom.

Sep 19

Nosotros beginning the week with 6.3 X & Y Coordinates. We've done a lot of piece of work with data, which is the backbone of nearly programs. Just, sometimes nosotros demand to format that information into something that looks more visually appealing. Think about your math lessons, that apply pie charts, graphs, and tables. Those visuals help readers better empathize the data they are looking at. Let's see how Python handles some basic graphics functions.

Sep 16

We continue with half-dozen.2 Colors and Loops. We live in a colorful world, and now we're going to add farther color to the lawmaking we write! We'll apply color to the types of programming loops that nosotros studied already. For this Code Do, we're going to leap over to an interactive Python site and larn about repetition with images. One time yous've got the hang of repeating images, upload at to the lowest degree vi of your images to Google Classroom.

Sep fifteen

We get-go with Unit of measurement 6 (nosotros are skipping Unit v) with 6.1 Color Code. Python isn't limited to just numbers or calculations. You can add colors to enhance your programs and make them more interesting to your users.

Sep xiii

Nosotros pick upwards with 4.ix Summing. In this lesson, we volition acquire about summing using a for loop.

Sep 12

We commencement Term 2 with 4.8 Counting by Other Than 1. We learned that the range function tin can have different parameters: range(ten), range(x,y) and range(x,y,z). Allow's await at how a for loop uses these parameters to count by numbers other than 1. Afterword, we will have Quiz 4. Admission Code kiwi

Sep 9

Today we await at a new function. 4.half-dozen Range Part returns the sequence of the given number between the given range. The most common use of it is to iterate sequence type (Python range() List, string, etc. ) with for and while loop using Python. Next, we'll look at For Loops.

Sep 8

Today nosotros await at data again with iv.4 Data Revisited and a review of looping. We've learned how to utilise various forms of data in previous lessons. At present, nosotros are going to harness that information using some of the techniques we've recently learned. Before we move on to more advanced forms of loop, similar the for loop, let's break to review what we've learned so far. In this lesson, we'll elaborate on how while loops can be used in our code and review key vocabulary.


Sep six

Today we accept Examination 3. The access code is hobby. Then it's on to 4.1 Loops. Sometimes, there will be actions that we need to be performed over and over again. Only, copying and pasting those commands several times is not the most efficient way of doing things. If we want to save time and effort, how can nosotros streamline our code?

Sep 2

Nosotros'll do Assignment 3: Chatbot. A chatbot is a computer program designed to emulate human conversation. For this program, you will use if statements, user input, and random numbers to create a basic chatbot.

The Scenario
Y'all have decided to design a fashion chatbot that helps people option out their style preferences. Your bot can gauge what types of clothes and accessories the user might like.

Your chatbot should ask the user the following (minimum requirements for the grader) and then give answers depending on the answers the user inputs:
at least 6 questions
at least 3 if-elif-else statements
the use of the random module and randomly generated numbers

Sep one

Today nosotros take Quiz 3. The access code is cardigan. Then information technology'due south on to three.six Defining Algorithms. Nosotros've been using algorithms for most of our lives, merely never defined those activities in that style. Algorithms are simply a ready of steps or instructions used to solve a trouble or accomplish a task. You could make an algorithm out of all the activities you performed today before starting this lesson. And so, how do we apply algorithms to Python?


Aug 31

We continue Unit of measurement 3 with three.4 If – Else. We know how to use the if statement - nonetheless, information technology can be a burden to write a separate if statement when nosotros are only trying to write code for when the initial argument fails. In these cases, the if-else statement lets us write lawmaking for the failing scenario with ease.


Aug xxx

We start Unit of measurement 3 with 3.two Uncomplicated Ifs. What happens when yous use the "if" statement in your code? "If" acts as a gateway to further actions. If something is truthful, then the program does something. If it's not truthful, and then it skips over that function and moves on in the program.


Aug 29

We start the calendar week with Assignment 2: Room Surface area. For this lab, yous volition find the area of an irregularly shaped room with the shape as shown above. Ask the user to enter the values for sides A, B, C, D, and E and print out the full room expanse. Remember the formula for finding the surface area of a rectangle is length * width and the expanse of a right triangle is 0.5 * the base * height. Please note the final area should be in decimal format.

Aug 26

We are going to talk about ii.6 Big Data. Big Data are sets of data that are so large or circuitous that traditional data processing (calculators, spreadsheets) aren't capable of dealing with them. Simply, with the advances in memory and processing power, we can chop-chop turn this data into valuable resources for usa to utilise.

Aug 25

Today we learn about random numbers. Generating Random Numbers is a lot like rolling dice. Every time y'all roll, you can get a different number betwixt 1 and half-dozen. In Python, y'all're not express to a fixed set of numbers. And with the random module that nosotros'll look at in this lesson, yous're not limited to numbers at all, but tin can apply other values besides. Then we will take Quiz 2. The access code is tomato plant.

Aug 24

We'll finish upwardly with 2.iii Code Practice, then move on to two.4 Built-in Functions. Generating random numbers is a lot like rolling die. Every time you curl, you can go a different number betwixt one and vi. In Python, you lot're non limited to a stock-still set of numbers. And with the random module that we'll wait at in this lesson, you're not express to numbers at all, but can use other values also.


Aug 23

Today we acquire a new kind of sectionalisation. 2.3 Modular Division . In this lesson, nosotros'll learn a new way to do partitioning, that focuses on the remainder after two numbers are divided. We'll first with a few examples of how we use modular division and explicate why we should care most remainders.

Aug 22

Today nosotros python into a calculator. 2.two Basic Calculations . In this lesson, we volition learn how Python handles number calculations, the rules for basic operations, how parentheses are used in Python, how to use exponents, and the order of operations.

Aug 19

Today nosotros volition take Exam 1. Access Lawmaking salmon
Later on the test, nosotros will jump to ii.1 Computer History. In this lesson, we volition learn about the history of computers and explore how technology has evolved over time.

Aug 18

We move on to 1.9 Understanding Binary. For many of your classes, you may store data by writing notes into a notebook. Merely, how does a figurer store information it receives? In this lesson, we'll explore binary lawmaking, the organization that computers use to store information. Then we will spring to Assignment one: Silly Sentences. We'll write a program that will ask the user for a serial of words. And so plug them into our paragraph template. Write a plan that will inquire the user for a serial of words. Then plug them into our paragraph template.

Aug 17

We continue with 1.8 Analog vs. Digital. In this lesson, we will look at information and how computers process the data we input.

Aug sixteen

We will start with ane.seven Information Types and Variables. You may take heard the give-and-take variable in a math class earlier. In this lesson, we will larn how Python handles unlike types of data and variables, and how it stores that data.

Aug 15

Nosotros movement on to i.half-dozen Input. In the previous lesson, we learned about data computers send out to the user. In this lesson, we volition learn nearly the information that users ship into the figurer. We'll too study variables and how they're used in Python.

Aug 12

We will cease the week with 1.5 Output In that location will be some videos, a lesson exercise (quiz), and then Code Practise.


Aug eleven

We will continue with ane.4 Hardware and Software There will be some videos, a lesson practise (quiz), and then we'll bound to 1.4 Code Do: Question 1.


Aug 10

We will begin with ane.i What is Computer science? There will exist some videos, a lesson practice (quiz), and then we'll do the code practise.


Aug nine

Sign in to your online accounts

Get to Project Stalk sign upward with your school email business relationship. Then bring together our class, grade code 0541fd

So, become to Google Classroom and join grade cyhfg2s

I don't know how much we will use Classroom, only we'll set it up only in example.

I also want you to create a document in your Google drive named Python Notes. From time to time I'll ask you to add to it.

Next become to Welcome to the course.

And so, we'll await at a curt video called Lawmaking Stars.

CS Python Fundamentals is an introductory-level course for students brand new to programming and computer science. In this grade, y'all volition learn problem-solving strategies, software pattern, and the foundations of informatics. Yous'll practice so using two key tools: the Project STEM programming environment and EarSketch, a software package that turns your code into music.

Non only will this grade prepare y'all for continuing your studies in computer scientific discipline (for example, past taking AP Estimator Scientific discipline A and AP Informatics Principles), merely it will as well teach yous how to call up like a scientist and solve real-earth bug, skills that are of import to every 21st-century citizen.

There are no prerequisites for this grade, although you should have basic familiarity with how to operate a computer and utilise applications. It's also recommended that you have familiarity with basic algebra principles before starting this course.

Click hither for the course syllabus.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

4.2 Code Practice Question 2,

Source: https://im8x10.com/bowman/introAssignments.html

Posted by: collinbroddy.blogspot.com

0 Response to "4.2 Code Practice Question 2"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel