python TypeError: can’t multiply sequence by non-int of type ‘float’

 

This error shows up when there is a type mismatch.

Example:

When you execute below code you will get this error-
 

>> hrs = input(“Enter Hours:”)
Enter Hours:40
>>> rate =float( input(“Enter Rate”))
enter rate: 10
>>> pay = hrs*rate
TypeError: can’t multiply sequence by non-int of type ‘float’

 

Solution for this:

hrs = float(input(“Enter Hours:”))
rate = float(input(“enter rate”))
pay = hrs*rate
print(‘Pay:’ , pay)

‘python’ is not recognized as an internal or external command, operable program or batch file.

when trying to access python from command line- we might get an error when we use – ‘python’. Use ‘py’ instead of ‘python’

C:\Users\tekjedi>python
‘python’ is not recognized as an internal or external command,
operable program or batch file.

C:\Users\tekjedi>python
Python 3.1(v……] on win32

Key words for search:
python-is-not-recognized-as-an-internal-or-external-command