Code Monkey home page Code Monkey logo

scripts_of_python_programming_book's Introduction

Python Programming Book

Dear Readers,

Thank you very much for reading my book. I hope, it will give you a starting point to learn and excel in programming.

Python scripts are available for book readers for easy learning and coding. Chapter-wise code examples have shared with related data files.

Have a Happy Coding!

Regards,

Sana Rasheed

scripts_of_python_programming_book's People

Contributors

sana-rasheed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

scripts_of_python_programming_book's Issues

Respected mam

I am reading your book on daily basis but I am facing an issue regarding where I can use python send me some ideas

problim in ex number 8,9

Example 8

Computer the value of a block of stock

shares= 150
price= 3 + 5.0/8.0
value= shares * price
print("value",value)

Example 9

Total value of a portfolio made up of two blocks of stock

portfolio = 0
portfolio += 150 * 2 + 1/4.0
portfolio += 75 * 1 + 7/8.0
print("portfolio", portfolio)

Very Good and comprehensive Book

Hi Mam,
I am just reading your book titled Python programming, Its more than spoon feeding for beginner. Before ready your i thought i was toughest language, now its looks like myth. Thanks your effort to write in our native language
Regards,
Shahan

my output not matched with your output in chapter 10

this is my code

f = open("demofile.txt","r")

​print(f.read ())

output

C:\Users\My Name>python demo_file_open.py
Hello! Welcome to demofile.txt
This file is for testing purposes.
Good Luck!

f = open("demofile.txt","r")
print(f.read(50))

output

C:\Users\My Name>python demo_file_open.py
Hello!

f = open("demofile.txt", "r")

print(f.readline())
print(f.readline())

output

C:\Users\My Name>python demo_file_open.py

Hello! Welcome to demofile.txt

f = open("demofile.txt","r" )
for a in f:
print(a)

output

C:\Users\My Name>python demo_file_open.py
Hello! Welcome to demofile.txt
This file is for testing purposes.
Good Luck!

f = open("demofile.txt","r")
print(f.readline())
f.close()

output

C:\Users\My Name>python demo_file_open.py

f = open("demofile2.txt","a")
f.write("Now the file has more content!")
f.close()

f = open("demofile2.txt","r")
print(f.read())

output

Now the file has more contentNow the file has more content!

f = open("demofile3.txt","w")
f.write("i have deleted the content")
f.close()


f = open("demofile3.txt","r")
print(f.read())

output
i have deleted the content

f = open("demofile.txt","r")
print(f.read(5))

output

C:\Us

Facing an error in Chapter_17th_unittest.py

Chapter Link: https://github.com/Sana-Rasheed/Scripts_of_Python_Programming_Book/blob/master/Chapter_17th_unittest.py
E
ERROR: C:\Users\Nasir\AppData\Roaming\jupyter\runtime\kernel-510a6c02-c3b3-432f-b96a-42c7be9fc54d (unittest.loader._FailedTest)
AttributeError: module 'main' has no attribute 'C:\Users\Nasir\AppData\Roaming\jupyter\runtime\kernel-510a6c02-c3b3-432f-b96a-42c7be9fc54d'


Ran 1 test in 0.001s
FAILED (errors=1)
An exception has occurred, use %tb to see the full traceback.
SystemExit: True

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.