A CFU or Check For Understanding are assignments we get regularly after we learn something new in class, we do them to test our skills in creating python programs and our understanding of them. The first couple just have the code and an explanation. We soon decided to also do flow charts to help us break down the code and what it is asking before we start it.
This CFU was so we could see how we can to use user input and output it from a sentence
This CFU allowed us to use more variables with user input and output the persons firstname, lastname, age and a number from 1-10 on how much the person likes funyuns
In this CFU we played around with mathematical operators. The code will ask the user for 2 numbers and will keep them as integers. Then, the code will add, subtract, multiply, divide, and do a special operator which will give us the remainder of the 2 numbers if there is one.
This CFU builds off the last one with the mathematical operators. We will ask the user to input 3 numbers, a, b and c and then plug it into the quadratic formula and then output the answer.
This CFU will ask the user to tell us how many of each coin and dollar they have in canadian dollars. The code will then multiply the number of the coin to the value of the coin and add it to the total. The code will then output the total in canadian dollars.
This CFU introduces us to the random code. Importing random made it so you can generate a random number and use it in your code. The user is asked to choose a number also and then they will use both of the numbers with mathematical operators. along with import math operations such as square root and powers.
This CFU introduced us to conditionals, if a condition is met the code of it will be run but if it isn't, it will then run the "else" code. We used it to ask they user a yes or no question on if they ordered delivery. Then it will ask the user how much it cost and how many people are with you to then divide the cost by people to show how much each person has to pay. If the person said no then it will tell the user "WHO IS COOKING?".
This CFU was a game we made in class. We are to ask a user how many times they want to roll a dice and then play the game the amount of times the user said. We used functions to keep our code neat and easy to reuse the amount of times a user wanted. For every guess a user gets right they get 6 points and lose 1 for every one they get wrong. At the end the users score will be outputted in a sentence.
CFU 10 is also a game. The computer will generate a number from 1-10 and the user will try to guess it. The computer will tell you if the number is lower or higher than your guess and track the number of attempts it took you then output it.
This CFU had 3 tasks. The first task was to use a for loop to print out multiples of 10 from 10 to 70. The second task was to print 0.5 starting from 0 to 10.0 using float variables and a for loop. Lastly, the task was to print the 99 bottles of beer on the wall song and subtract 1 from the total until there was no more beer on the wall.
This CFU had 2 versions. The first version is to ask the user for what the password is and loop it until the user gets it correct. The second version will ask a user the same thing but keep count of the amount of times they get the question wrong. If they get it wrong 3 times then it will not allow the user to keep guessing.
A Python Coding Challenge is something to help us understand and code Python in a more complicated way. We used these to practice our Python when we were working on other projects such as G4C or InfyApp
We had a worksheet where we had three questions and we had to answer them on paper, then we uploaded the code to codeskulptor
This code asked us to move the word so the lat letter is at 70 lines. We had to find out the number of letters in the wording using len and then subtracting it from the total spaces so we can add it at the end.
This is a code that will take a string you made and print it twice. A simple code that helps us understand functions
This is a code that made us create some functions in order to make designs using + and -. I had to call the functions multiple times to get what I wanted.
We had to make a function where we can see if Fermat's formula holds up. (It doesn't)
In this challenge, we had to create 2 functions, one that will check if 3 sizes of a line can be a triangle, the other one would ask for user input with integers they want to try.
This is our first time using Trinket. We had to make shapes that are used in nature and biology. And we also had to make a square using the turtle
We use the previous challenge as a base for this one. We had to make another square that doubles the size of our last one using its height and length
We again use the previous challenge as a base. We had to learn how to make polygons by inputing the number of sides that we wanted
Did not complete
Now, after learning how to make polygons we had to make arcs using circles. We had to make sure it used the space we wanted it to and stopped when we wanted it to also.
Using what we learned so far, arcs, polygons, basic shapes and loops, we were tasked in making flowers with difference numbe of petals and sizes of them.
Did not complete
We had to make a function on creating a spiral with different difference in how long it will go on for and the length between each line.
To end it off we had to use Koch's curve to create a function that will draw snowflakes with varying features
We move back to codeskulptor where we have to create an array of functions that see if a word is a palindrome. This means to see if the word can be spelled the same backwords
This function is created to see if a number is the power of another using division and if statements.
This function will check if a 2 numbers have a greatest common factor, if it does it will be printed and if not it will be listed as 1.
This function will intake strings and check to see if it has the letter e in the word using loops and len for each letter.
This challenge uses the same concept as the last one but now uses multiple letters known as forbidden letters.
This challenge does the opposite of the last two. Now we can check to see if a sentence or word uses only the letters allowed.
Now we can check to see if a sentence or word uses only the letters allowed.
This will check if a words is abecedarian, meaning as it is spelled it will go up in alphabetical order.
This homework was given to us via google form and I can't upload it. Here we got samples of code and then got questions of it based on the errors it has and how we can fix it.