# Python

**URL:** https://forum.codewithmosh.com/c/python/5.md?page=3

[Latest](https://forum.codewithmosh.com/latest.md) · [Categories](https://forum.codewithmosh.com/categories.md)

**Page:** 4

---

## [Hangman Game using python](https://forum.codewithmosh.com/t/hangman-game-using-python/28592)

<div class="topic-metadata">

**Author:** [@KdeltaX](https://forum.codewithmosh.com/u/KdeltaX)\
**Replies:** 2\
**Last updated:** [September 12, 2024, 12:08pm UTC](https://forum.codewithmosh.com/t/hangman-game-using-python/28592 "2024-09-12T12:08:23Z")

</div>

A fun project i did in my free time. Please do review it!!

---

## [New member bigginer](https://forum.codewithmosh.com/t/new-member-bigginer/28697)

<div class="topic-metadata">

**Author:** [@shamaki8063](https://forum.codewithmosh.com/u/shamaki8063)\
**Replies:** 1\
**Last updated:** [September 12, 2024, 5:24am UTC](https://forum.codewithmosh.com/t/new-member-bigginer/28697 "2024-09-12T05:24:26Z")

</div>

I am new member can someone help me and guide me on python

---

## [Assert function in exception](https://forum.codewithmosh.com/t/assert-function-in-exception/28684)

<div class="topic-metadata">

**Author:** [@MariaK](https://forum.codewithmosh.com/u/MariaK)\
**Replies:** 0\
**Last updated:** [September 11, 2024, 11:15am UTC](https://forum.codewithmosh.com/t/assert-function-in-exception/28684 "2024-09-11T11:15:01Z")

</div>

def foo(x): assert x return 1/x try: print(foo(0)) except ZeroDivisionError: print(“zero”) except: print(“some”) I dont understand why the output is ‘some’ and not ‘zero’

---

## [Number Guessing Game \[Exercise\]](https://forum.codewithmosh.com/t/number-guessing-game-exercise/28673)

<div class="topic-metadata">

**Author:** [@kevinhu](https://forum.codewithmosh.com/u/kevinhu)\
**Replies:** 0\
**Last updated:** [September 11, 2024, 12:23am UTC](https://forum.codewithmosh.com/t/number-guessing-game-exercise/28673 "2024-09-11T00:23:27Z")

</div>

A game where the program randomly selects a number, and the user has to guess it. Provides feedback if the guess is too high or too low and keep track of the number of attempts the user makes.

---

## [Basic Calculator \[Exercise\]](https://forum.codewithmosh.com/t/basic-calculator-exercise/28663)

<div class="topic-metadata">

**Author:** [@kevinhu](https://forum.codewithmosh.com/u/kevinhu)\
**Replies:** 1\
**Last updated:** [September 10, 2024, 8:49pm UTC](https://forum.codewithmosh.com/t/basic-calculator-exercise/28663 "2024-09-10T20:49:57Z")

</div>

A basic calculator that can perform operations like addition, subtraction, multiplication, and division. This calculator take input from the user, select operator to perform and display the result of that operation.

---

## [VSCODE Alarm when using terminal to execute python file](https://forum.codewithmosh.com/t/vscode-alarm-when-using-terminal-to-execute-python-file/28600)

<div class="topic-metadata">

**Author:** [@LinFen](https://forum.codewithmosh.com/u/LinFen)\
**Replies:** 1\
**Last updated:** [September 8, 2024, 2:03pm UTC](https://forum.codewithmosh.com/t/vscode-alarm-when-using-terminal-to-execute-python-file/28600 "2024-09-08T14:03:23Z")

</div>

PS C:\\Users\\innov\\Desktop\\HelloWord\> $python app.py 所在位置 行:1 字符: 9 $python app.py ~~~~~~ 表达式或语句中包含意外的标记“app.py”。 + CategoryInfo : ParserError: (:slight\_smile: , ParentContainsErrorRecordException + …

---

## [Solution to Password Generator using Random and String package in Python](https://forum.codewithmosh.com/t/solution-to-password-generator-using-random-and-string-package-in-python/28610)

<div class="topic-metadata">

**Author:** [@Gourav97](https://forum.codewithmosh.com/u/Gourav97)\
**Replies:** 0\
**Last updated:** [September 8, 2024, 4:39am UTC](https://forum.codewithmosh.com/t/solution-to-password-generator-using-random-and-string-package-in-python/28610 "2024-09-08T04:39:55Z")

</div>

Here is the solution to Password Generator using Random and String package in Python which is given below: import string import random length = int(input("Enter password length: ")) print(‘’‘Choose character set for …

---

## [Solution to Calculator using functions in Python](https://forum.codewithmosh.com/t/solution-to-calculator-using-functions-in-python/28585)

<div class="topic-metadata">

**Author:** [@Gourav97](https://forum.codewithmosh.com/u/Gourav97)\
**Replies:** 0\
**Last updated:** [September 6, 2024, 2:48pm UTC](https://forum.codewithmosh.com/t/solution-to-calculator-using-functions-in-python/28585 "2024-09-06T14:48:47Z")

</div>

Here is the solution to Calculator using functions in Python which is given below: def main(): x = float(input("Input first number: ")) y = float(input("Input second number: ")) print("Addition: {0:.2f}".format(x + y…

---

## [Solution to Fibonacci Sequence using functions in Python](https://forum.codewithmosh.com/t/solution-to-fibonacci-sequence-using-functions-in-python/27718)

<div class="topic-metadata">

**Author:** [@Gourav97](https://forum.codewithmosh.com/u/Gourav97)\
**Replies:** 2\
**Last updated:** [September 5, 2024, 4:23am UTC](https://forum.codewithmosh.com/t/solution-to-fibonacci-sequence-using-functions-in-python/27718 "2024-09-05T04:23:46Z")

</div>

Here is the solution to Fibonacci Sequence using functions in Python which is given below: def FibonacciSeries(n): if n \< 0: print(“Invalid Input”) elif n==0: return 0 elif n==1 or n==2: return 1 else: return Fi…

---

## [Is it bad not being able to do the challenges?](https://forum.codewithmosh.com/t/is-it-bad-not-being-able-to-do-the-challenges/28125)

<div class="topic-metadata">

**Author:** [@Explants](https://forum.codewithmosh.com/u/Explants)\
**Replies:** 1\
**Last updated:** [September 4, 2024, 6:28pm UTC](https://forum.codewithmosh.com/t/is-it-bad-not-being-able-to-do-the-challenges/28125 "2024-09-04T18:28:05Z")

</div>

Hello! I am currently doing the beginner course for python on youtube (https://youtu.be/\_uQrJ0TkZlc?si=WW3HfyJ7xpOSZdbW) And whenever I encounter a challenge to try myself I am basically never able to do them, I just f…

---

## [Prime numbers code](https://forum.codewithmosh.com/t/prime-numbers-code/28339)

<div class="topic-metadata">

**Author:** [@Tobi2010](https://forum.codewithmosh.com/u/Tobi2010)\
**Replies:** 1\
**Last updated:** [September 4, 2024, 5:22pm UTC](https://forum.codewithmosh.com/t/prime-numbers-code/28339 "2024-09-04T17:22:38Z")

</div>

where can i find the python teaching that mr mosh did in which module

---

## [Where this file](https://forum.codewithmosh.com/t/where-this-file/28338)

<div class="topic-metadata">

**Author:** [@Deight](https://forum.codewithmosh.com/u/Deight)\
**Replies:** 1\
**Last updated:** [September 4, 2024, 5:18pm UTC](https://forum.codewithmosh.com/t/where-this-file/28338 "2024-09-04T17:18:30Z")

</div>

where to download this file: transaction.xlsx

---

## [Can't create openpyxl](https://forum.codewithmosh.com/t/cant-create-openpyxl/24763)

<div class="topic-metadata">

**Author:** [@mawelasurprise](https://forum.codewithmosh.com/u/mawelasurprise)\
**Replies:** 10\
**Last updated:** [September 4, 2024, 5:12pm UTC](https://forum.codewithmosh.com/t/cant-create-openpyxl/24763 "2024-09-04T17:12:27Z")

</div>

Hi. I do struggle to create openpyxl on my PYCHARM(Windows 11). I have seen your tutorial but i ma still struggling to create it. Which other method can I used to create it?

---

## [Python fundamental](https://forum.codewithmosh.com/t/python-fundamental/28537)

<div class="topic-metadata">

**Author:** [@rijalsam](https://forum.codewithmosh.com/u/rijalsam)\
**Replies:** 0\
**Last updated:** [September 4, 2024, 4:16pm UTC](https://forum.codewithmosh.com/t/python-fundamental/28537 "2024-09-04T16:16:35Z")

</div>

Hi everyone, I recently completed the Python mastery course by Mosh, and I found it incredibly valuable. The comprehensive content and practical examples have significantly enhanced my understanding of Python. To furth…

---

## [Importing webdriver from selenium](https://forum.codewithmosh.com/t/importing-webdriver-from-selenium/28387)

<div class="topic-metadata">

**Author:** [@Will\_13](https://forum.codewithmosh.com/u/Will_13)\
**Replies:** 0\
**Last updated:** [August 25, 2024, 12:10am UTC](https://forum.codewithmosh.com/t/importing-webdriver-from-selenium/28387 "2024-08-25T00:10:18Z")

</div>

I’m practicing lesson 11.8 (Browser Automation) and followed every single step Mosh executed (except that I used ms edge) up to code line 4 as shown below: from selenium import webdriver browser = webdriver.Edge() b…

---

## [Full Course-Cheat Sheet](https://forum.codewithmosh.com/t/full-course-cheat-sheet/1732)

<div class="topic-metadata">

**Author:** [@Gonzy](https://forum.codewithmosh.com/u/Gonzy)\
**Replies:** 2\
**Last updated:** [August 24, 2024, 10:57am UTC](https://forum.codewithmosh.com/t/full-course-cheat-sheet/1732 "2024-08-24T10:57:22Z")

</div>

Hi guys, I am new in the course of Python. In order to study slowly and calmly all that I am watching in these videos, I would like to find a Cheet Sheet which summarised all the content that is taught in this course. I…

---

## [Python Terminal VSCode Problem](https://forum.codewithmosh.com/t/python-terminal-vscode-problem/689)

<div class="topic-metadata">

**Author:** [@neoDaMuffinMan](https://forum.codewithmosh.com/u/neoDaMuffinMan)\
**Replies:** 3\
**Last updated:** [August 24, 2024, 8:17am UTC](https://forum.codewithmosh.com/t/python-terminal-vscode-problem/689 "2024-08-24T08:17:18Z")

</div>

Hello, I have recently started my Python Beginner’s Course in Code With Mosh, I have been really enjoying it, however I have a problem with running code. I can run code successfully in the output window, using the shortc…

---

## [Excel automation](https://forum.codewithmosh.com/t/excel-automation/21747)

<div class="topic-metadata">

**Author:** [@Rajesh](https://forum.codewithmosh.com/u/Rajesh)\
**Replies:** 2\
**Last updated:** [August 23, 2024, 2:14pm UTC](https://forum.codewithmosh.com/t/excel-automation/21747 "2024-08-23T14:14:13Z")

</div>

Hi Mosh, It would have been great, if you could teach how to automate multiple Excel file into one and automate repetitive task like plotting pivot table in python.

---

## [My excel named 'tansactions.xlsx does not open when I run the code](https://forum.codewithmosh.com/t/my-excel-named-tansactions-xlsx-does-not-open-when-i-run-the-code/24885)

<div class="topic-metadata">

**Author:** [@mawelasurprise](https://forum.codewithmosh.com/u/mawelasurprise)\
**Replies:** 2\
**Last updated:** [August 21, 2024, 4:56pm UTC](https://forum.codewithmosh.com/t/my-excel-named-tansactions-xlsx-does-not-open-when-i-run-the-code/24885 "2024-08-21T16:56:03Z")

</div>

This is the icon that my excel at openpyxl shows me. Is this has to do with the credibility of my excel program or personal error leading to it!

---

## [Development web server question](https://forum.codewithmosh.com/t/development-web-server-question/28269)

<div class="topic-metadata">

**Author:** [@steve.steve](https://forum.codewithmosh.com/u/steve.steve)\
**Replies:** 0\
**Last updated:** [August 16, 2024, 8:59am UTC](https://forum.codewithmosh.com/t/development-web-server-question/28269 "2024-08-16T08:59:59Z")

</div>

I am new to coding (6-months in) and currently making my way through Mosh’s Python mastery course alongside using what I’ve learned to build a simple app Even before getting to the code, I’ve been spending a lot of time…

---

## [A Possible Solution to the First Practice](https://forum.codewithmosh.com/t/a-possible-solution-to-the-first-practice/28246)

<div class="topic-metadata">

**Author:** [@Alireza](https://forum.codewithmosh.com/u/Alireza)\
**Replies:** 0\
**Last updated:** [August 13, 2024, 9:14pm UTC](https://forum.codewithmosh.com/t/a-possible-solution-to-the-first-practice/28246 "2024-08-13T21:14:48Z")

</div>

Hello everyone. I hope you are doing well. I have coded the following five questions. Hope it prove beneficial. 1. Prime Numbers Create a function that returns a list of all prime numbers up to a given number. Solution…

---

## [Unexpected Token - First Python Program Class](https://forum.codewithmosh.com/t/unexpected-token-first-python-program-class/24679)

<div class="topic-metadata">

**Author:** [@Megan](https://forum.codewithmosh.com/u/Megan)\
**Replies:** 8\
**Last updated:** [August 12, 2024, 9:00pm UTC](https://forum.codewithmosh.com/t/unexpected-token-first-python-program-class/24679 "2024-08-12T21:00:01Z")

</div>

I’ve just watched video for the Python Mastery course. I’ve verified that python is set up but I’m getting this error message. No idea how to fix it.

---

## [Unable to Install Pylint](https://forum.codewithmosh.com/t/unable-to-install-pylint/189)

<div class="topic-metadata">

**Author:** [@Grace](https://forum.codewithmosh.com/u/Grace)\
**Replies:** 18\
**Last updated:** [August 11, 2024, 10:08am UTC](https://forum.codewithmosh.com/t/unable-to-install-pylint/189 "2024-08-11T10:08:53Z")

</div>

Hi. I have just started the Complete Python Mastery course. I am up to 1.6 which explains how to install the python extension and pylint in VS code. I am following the video and can install the python extension without p…

---

## [Getting a strange error in Jupyter](https://forum.codewithmosh.com/t/getting-a-strange-error-in-jupyter/28193)

<div class="topic-metadata">

**Author:** [@Explants](https://forum.codewithmosh.com/u/Explants)\
**Replies:** 0\
**Last updated:** [August 10, 2024, 2:12pm UTC](https://forum.codewithmosh.com/t/getting-a-strange-error-in-jupyter/28193 "2024-08-10T14:12:29Z")

</div>

I don’t understand why it says that the file could not be found Both files are in desktop

---

## [String Variables: Printing individual characters](https://forum.codewithmosh.com/t/string-variables-printing-individual-characters/16216)

<div class="topic-metadata">

**Author:** [@reverse\_rj](https://forum.codewithmosh.com/u/reverse_rj)\
**Replies:** 7\
**Last updated:** [November 3, 2022, 3:10pm UTC](https://forum.codewithmosh.com/t/string-variables-printing-individual-characters/16216 "2022-11-03T15:10:54Z")

</div>

Hello, How to print last 3 (say) characters of a string? My query: If printing first 3(say) characters is- name = “Python” print(name\[0:3\]) AND printing last character is- name = “Python” print(name\[-1\]) Then fo…

---

## [Assistance on how to fix my python path on my windows 11!](https://forum.codewithmosh.com/t/assistance-on-how-to-fix-my-python-path-on-my-windows-11/28074)

<div class="topic-metadata">

**Author:** [@Muzzammil](https://forum.codewithmosh.com/u/Muzzammil)\
**Replies:** 0\
**Last updated:** [August 5, 2024, 4:56pm UTC](https://forum.codewithmosh.com/t/assistance-on-how-to-fix-my-python-path-on-my-windows-11/28074 "2024-08-05T16:56:58Z")

</div>

Hello guys, I’ve noticed in my windows computer for some time now. I can’t view my python version each time I try to check the version on my command prompt, and I also noticed I can’t uninstall the same python app from m…

---

## [Pipenv install issue on windows 11 pc](https://forum.codewithmosh.com/t/pipenv-install-issue-on-windows-11-pc/24814)

<div class="topic-metadata">

**Author:** [@Miles](https://forum.codewithmosh.com/u/Miles)\
**Replies:** 2\
**Last updated:** [March 17, 2024, 7:46am UTC](https://forum.codewithmosh.com/t/pipenv-install-issue-on-windows-11-pc/24814 "2024-03-17T07:46:22Z")

</div>

Pipenv is not recognized as a name of a cmdlet. I am a little stuck can someone help please

---

## [Complete Python Mastery Course](https://forum.codewithmosh.com/t/complete-python-mastery-course/27665)

<div class="topic-metadata">

**Author:** [@CCpyops](https://forum.codewithmosh.com/u/CCpyops)\
**Replies:** 0\
**Last updated:** [July 14, 2024, 11:23pm UTC](https://forum.codewithmosh.com/t/complete-python-mastery-course/27665 "2024-07-14T23:23:15Z")

</div>

Hey guys, I a m new here been trying to learn Python for the past year and can not find any course that I like. I ran across Mosh’s teaching and I like how he explains things but sometimes its still too simple for me bec…

---

## [The best dark theme to be used for VsCode](https://forum.codewithmosh.com/t/the-best-dark-theme-to-be-used-for-vscode/1377)

<div class="topic-metadata">

**Author:** [@rhadadi](https://forum.codewithmosh.com/u/rhadadi)\
**Replies:** 19\
**Last updated:** [August 4, 2024, 3:28pm UTC](https://forum.codewithmosh.com/t/the-best-dark-theme-to-be-used-for-vscode/1377 "2024-08-04T15:28:59Z")

</div>

Hi there–what VsCode mosh is using for his Python class? I tried various dark themes and none are similar to what he has used in his videos.

---

## [I have a problem with querying the website using Python](https://forum.codewithmosh.com/t/i-have-a-problem-with-querying-the-website-using-python/28035)

<div class="topic-metadata">

**Author:** [@m.stolc](https://forum.codewithmosh.com/u/m.stolc)\
**Replies:** 0\
**Last updated:** [August 2, 2024, 9:56pm UTC](https://forum.codewithmosh.com/t/i-have-a-problem-with-querying-the-website-using-python/28035 "2024-08-02T21:56:22Z")

</div>

I have a problem with querying the website using the script below, I get error 422 and I have no idea what the problem is. import requests import time import csv import json import pandas as pd Adres URL do zapytan…

[Previous page](https://forum.codewithmosh.com/c/python/5.md?page=2)

[Next page](https://forum.codewithmosh.com/c/python/5.md?page=4)
