## Saturday, 7 November 2020

## Friday, 6 November 2020

## Introduction To Web Development Coursera | Week 6

## WEEK 6 Quiz module

** ANSWERS ARE MARKED WITH correct SIGN.**

## 1. Question 1 One of the main features of server side development is

CSS

HTML

None of these

JavaScript

Databases

Correct

## 2. Question 2 Which of these is not a client side technology?

PHP

CorrectJavaScript

Browsers

CSS

HTML

## 3. Question 3 What can be said about a while loop? (Select all that apply.)

The perform actions repetitively until complete

CorrectThey often use a loop counter

CorrectAll of these are correct

They are mainly used for writing vertical text

## 4. Question 4 When we are working with characters in a string we refer to them by number:

The numbering starts at 1

The numbering starts at 0

CorrectNone of these

The numbering starts at 0, but only in JavaScript

We can start with any number

## 5. Question 5 What operator do programmers frequently use to add 1 to a variable i?

i**

<i>

i + I;

i++;

Correcti = I + 1;

## 6. Question 6 In programming languages we will often work with collections of things. Which of the following could be considered a collection? (Select all that apply.)

A form

The elements of a form

CorrectThe letters that make up a string

CorrectAll of these are correct

A string

## 7. Question 7 The two most common loops we see in JavaScript are

None of these

for and for each

repeat and go

while and for

Correctdo and while

## 8. Question 8 What is true about loops in programming languages? (Select all that apply.)

Multiple kinds of loops is a convenience

CorrectFor and while loops are the least common

We need many kinds of loops to be effective

We really only need one kind of loop

Correct

## 9. Question 9 Which of these are recommended to improve your Web development and programming skills? (Select all that apply.)

Imitating other people’s software is a waste of time

It’s best to focus on your code and ignore what others are doing

Imitate other software as a way to learn and practice

CorrectIt pays to be curious about other people software and features

Correct

## 10. Question 10 What is the recommended approach to problems?

Tackle medium and large problems because they build skill faster

Break problems down into their smallest parts

CorrectAvoid problems and move on to something easier.

None of these

## 11. Question 11 What can we say about continuing to learn about Web development?

Teaching others can lead to them stealing your best ideas

It’s best to work and communicate with others

CorrectIt’s best to work alone so you can concentrate

Teaching others is a distraction that limits your learning

## 12. Question 12 What are the recommendations for working on your final project? (Select all that apply.)

None of these

Think about the purpose of your form before you start

CorrectAll of these are true

Start with a very basic CSS file and get that working first

CorrectAvoid starting with a template

- coursera solutions.info
- coursera solutions github
- coursera solutions python
- coursera solutions machine learning
- coursera solutions python data structures
- coursera solutions programming fundamentals
- coursera solutions quora
- coursera solutions youtube
- coursera solutions info
- edx solutions alliance
- coursera assignment solutions
- coursera assignment solutions data science
- coursera algorithms solutions
- coursera assignment solutions python
- coursera assignment solutions html css and javascript
- coursera aws solutions architect associate
- coursera matlab assignment solutions
- coursera python basics solutions
- edx solutions bolsa de trabajo
- edx solutions b2b
- coursera courses solutions
- coursera cryptography solutions
- coursera-cryptography 1 solutions
- edx course solutions
- coursera algorithmic toolbox solutions c++
- coursera matlab course solutions
- data structures coursera solutions c++
- coursera dsp course solutions
- coursera solutions deep learning
- coursera dsp solutions
- coursera solutions for data structures and algorithms
- coursera ex2 solutions
- coursera excel solutions
- coursera ex4 solution
- coursera ex3 solution
- coursera ex5 solution
- coursera ex6 solution
- coursera power electronics solutions
- coursera solutions python for everybody
- coursera global financing solutions
- solutions for coursera courses
- edx solutions facturacion
- edx solutions github
- coursera quiz solutions github
- coursera algorithmic toolbox solutions github
- coursera algorithmic toolbox solutions github c++
- data structures coursera solutions github
- machine learning coursera solutions github
- modern robotics coursera solutions github
- coursera homework solutions
- edx homework solutions
- coursera matlab homework solutions
- cryptography i coursera solutions
- coursera algorithmic toolbox solutions java
- java coursera solutions
- coursera answers
- coursera assignment github
- coursera l4g solutions
- ml coursera solutions
- ml-coursera-python-assignment solutions
- coursera matlab solutions
- coursera cryptography maryland solutions
- coursera sequence models solutions
- coursera discrete mathematics solutions
- edx solutions mexico
- coursera andrew ng solutions
- coursera convolutional neural networks solutions
- nlp coursera solutions
- coursera discrete optimization solutions
- solutions of coursera courses
- edx python solutions
- coursera algorithmic toolbox solutions python
- coursera r programming solutions
- coursera competitive programming solutions
- coursera quiz solutions
- edx quiz solutions
- coursera python quiz solutions
- coursera ml quiz solutions
- deep learning coursera solutions quiz
- coursera algorithmic toolbox quiz solutions
- coursera statistics with r solutions

## Python Lists and Tuples Operations Cheat Sheet

## Lists and Tuples Operations Cheat Sheet

Lists and tuples are both sequences, so they share a number of sequence operations. But, because lists are mutable, there are also a number of methods specific just to lists. This cheat sheet gives you a run down of the common operations first, and the list-specific operations second.

### Common sequence operations

- len(sequence) Returns the length of the sequence
- for element in sequence Iterates over each element in the sequence
- if element in sequence Checks whether the element is part of the sequence
- sequence[i] Accesses the element at index i of the sequence, starting at zero
- sequence[i:j] Accesses a slice starting at index i, ending at index j-1. If i is omitted, it's 0 by default. If j is omitted, it's len(sequence) by default.
- for index, element in enumerate(sequence) Iterates over both the indexes and the elements in the sequence at the same time

Check out the official documentation for sequence operations.

### List-specific operations and methods

- list[i] = x Replaces the element at index i with x
- list.append(x) Inserts x at the end of the list
- list.insert(i, x) Inserts x at index i
- list.pop(i) Returns the element a index i, also removing it from the list. If i is omitted, the last element is returned and removed.
- list.remove(x) Removes the first occurrence of x in the list
- list.sort() Sorts the items in the list
- list.reverse() Reverses the order of items of the list
- list.clear() Removes all the items of the list
- list.copy() Creates a copy of the list
- list.extend(other_list) Appends all the elements of other_list at the end of list

Most of these methods come from the fact that lists are mutable sequences. For more info, see the official documentation for mutable sequences and the list specific documentation.

### List comprehension

- [expression for the variable in sequence] Creates a new list based on the given sequence. Each element is the result of the given expression.

- [expression for the variable in sequence if condition] Creates a new list based on the given sequence. Each element is the result of the given expression; elements only get added if the condition is true.

list and tuples in python ppt list and tuples in python pdf list and tuples in python w3schools difference between lists and tuples python lists vs tuples python concatenate list and tuple python list and tuple in python program merge list and tuple python list of tuples python access list of tuples python append list tuple array python a list of tuples python list of tuples python create list of tuples python count list of tuples comprehension python list to tuple conversion python list to tuple converter python lists and tuples in python list and tuple difference python lists tuples dictionaries python list tuple dict python list tuple dictionary python ppt list of tuples python example python list and tuple exercises list of tuples element python list of tuples python for loop list of tuples python get first list of tuples groupby python given that python lists and python tuples are quite similar list and tuple in python in hindi list and tuple in python difference list dictionaries and tuples in python compare list and tuples in python list tuple join python list and tuples in python lists dictionaries and tuples in python list tuple and set in python list and tuples what are lists and tuples in python what is list and tuples in python list tuples and dictionary in python ppt list vs tuple performance python list of tuple pairs python python lists and tuples quiz python list and tuple questions list tuple range python list tuple python sorting list tuples sets python list of tuples python split list of tuples python string list of tuples search python list of tuples python to dict list tuple to python python lists and tuples python programs on lists and tuples programs on list and tuples in python python list vs tuple two lists into tuples python list of tuples python 3 list vs tuple python 3

## Monday, 2 November 2020

## Python Loops Cheat Sheet

## Loops Cheat Sheet

Check out below for a rundown of the syntax for while loops and for loops.

### While Loops

A while loop executes the body of the loop while the condition remains True.

Syntax:

12while condition:body

Things to watch out for!

- Failure to initialize variables. Make sure all the variables used in the loop’s condition are initialized before the loop.
- Unintended infinite loops. Make sure that the body of the loop modifies the variables used in the condition, so that the loop will eventually end for all possible values of the variables.

Typical use:

While loops are mostly used when there’s an unknown number of operations to be performed, and a condition needs to be checked at each iteration.

### For Loops

A for loop iterates over a sequence of elements, executing the body of the loop for each element in the sequence.

Syntax:

12for variable in sequencebody

The range() function:

range() generates a sequence of integer numbers. It can take one, two, or three parameters:

- range(n): 0, 1, 2, ... n-1
- range(x,y): x, x+1, x+2, ... y-1
- range(p,q,r): p, p+r, p+2r, p+3r, ... q-1 (if it's a valid increment)

Common pitfalls:

- Forgetting that the upper limit of a range() isn’t included.
- Iterating over non-sequences. Integer numbers aren’t iterable. Strings are iterable letter by letter, but that might not be what you want.

Typical use:

For loops are mostly used when there's a pre-defined sequence or range of numbers to iterate.

### Break & Continue

You can interrupt both while and for loops using the break keyword. We normally do this to interrupt a cycle due to a separate condition.

You can use the continue keyword to skip the current iteration and continue with the next one. This is typically used to jump ahead when some of the elements of the sequence aren’t relevant.

If you want to learn more, check out this wiki page on for loops.

## Monday, 26 October 2020

## First Programming Concepts Cheat Sheet

## First Programming Concepts Cheat Sheet

### Functions and Keywords

Functions and keywords are the building blocks of a language’s syntax.

Functions are pieces of code that perform a unit of work. In the examples we've seen so far, we've only encountered the print() function, which prints a message to the screen. We'll learn about a lot of other functions in later lessons but, if you're too curious to wait until then, you can discover all the functions available here.

Keywords are reserved words that are used to construct instructions. We briefly encountered for and in in our first Python example, and we'll use a bunch of other keywords as we go through the course. For reference, these are all the reserved keywords:

False | class | finally | is | return |

None | continue | for | lambda | try |

True | def | from | nonlocal | while |

and | del | global | not | with |

as | elif | if | or | yield |

assert | else | import | pass | |

break | except | in | raise |

You don't need to learn this list; we'll dive into each keyword as we encounter them. In the meantime, you can see examples of keyword usage here.

### Arithmetic operators

Python can operate with numbers using the usual mathematical operators, and some special operators, too. These are all of them (we'll explore the last two in later videos).

- a + b = Adds a and b
- a - b = Subtracts b from a
- a * b = Multiplies a and b
- a / b = Divides a by b
- a ** b = Elevates a to the power of b. For non-integer values of b, this becomes a root (i.e. a**(1/2) is the square root of a)
- a // b = The integer part of the integer division of a by b
- a % b = The remainder part of the integer division of a by b