GithubHelp home page GithubHelp logo

gkodkod / python-basic-course-soluions-coursera Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mayankdawar/python-basic-course-soluions-coursera

1.0 0.0 0.0 889 KB

Solutions of all python problems of coursera MOOC python basic by University of Michigan under course Python 3 Prgramming

Python 100.00%

python-basic-course-soluions-coursera's Introduction

Python-Basic-course-soluions-coursera

Solutions of all python problems of coursera MOOC python basic by University of Michigan under course Python 3 Prgramming, I have uploaded pdf with assessment name for MCQ part alone and all other programming portion is in .py files

Question -> Write code to add ‘horseback riding’ to the third position (i.e., right before volleyball) in the list sports. Solution -> gradedWeek4(2)_1.py

Question -> Write code to take ‘London’ out of the list trav_dest. Solution -> gradedWeek4(2)_2.py

Question -> Write code to add ‘Guadalajara’ to the end of the list trav_dest using a list method. Solution -> gradedWeek4(2)_3.py

Question -> Write code to rearrange the strings in the list winners so that they are in alphabetical order from A to Z. Solution -> gradedWeek4(2)_4.py

Question -> Write code to switch the order of the winners list so that it is now Z to A. Assign this list to the variable z_winners. Solution -> gradedWeek4(2)_5.py

Question -> Currently there is a string called str1. Write code to create a list called chars which should contain the characters from str1. Each character in str1 should be its own element in the list chars. Solution -> gradedWeek4(3)_1.py

Question -> For each character in the string saved in ael, append that character to a list that should be saved in a variable app. Solution -> gradedWeek4(4)_1.py

Question -> For each string in wrds, add ‘ed’ to the end of the word (to make the word past tense). Save these past tense words to a list called past_wrds. Solution -> gradedWeek4(4)_2.py

Question -> Below are a set of scores that students have received in the past semester. Write code to determine how many are 90 or above and assign that result to the value a_scores. Solution -> gradedWeek4(5)_1.py

Question -> Write code that uses the string stored in org and creates an acronym which is assigned to the variable acro. Only the first letter of each word should be used, each letter in the acronym should be a capital letter, and there should be nothing to separate the letters of the acronym. Words that should not be included in the acronym are stored in the list stopwords. For example, if org was assigned the string “hello to world” then the resulting acronym should be “HW”. Solution -> gradedWeek4(5)_2.py

Question -> Write code that uses the string stored in sent and creates an acronym which is assigned to the variable acro. The first two letters of each word should be used, each letter in the acronym should be a capital letter, and each element of the acronym should be separated by a “. ” (dot and space). Words that should not be included in the acronym are stored in the list stopwords. For example, if sent was assigned the string “height and ewok wonder” then the resulting acronym should be “HE. EW. WO”. Solution -> gradedWeek4(5)_3.py

Question -> A palindrome is a phrase that, if reversed, would read the exact same. Write code that checks if p_phrase is a palindrome by reversing it and then checking if the reversed version is equal to the original. Assign the reversed version of p_phrase to the variable r_phrase so that we can check your work. Solution -> gradedWeek4(5)_4.py

Question -> Provided is a list of data about a store’s inventory where each item in the list represents the name of an item, how much is in stock, and how much it costs. Print out each item in the list with the same formatting, using the .format method (not string concatenation). For example, the first print statment should read The store has 12 shoes, each for 29.99 USD. Solution -> gradedWeek4(5)_5.py

python-basic-course-soluions-coursera's People

Contributors

mayankdawar avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.