You are missing parenthesis around the print statements. The correct syntax is:
print("Temperature: ", temperature," C humidity: ", humidity)
Python 3 requires print statements containing text to be inside of (” “), variables inserted like:
print(" text ", variable, "more text")
More Related Contents:
- WebDriverException: Message: invalid argument: can’t kill an exited process with GeckoDriver, Selenium and Python on RaspberryPi3
- Accessing CPU temperature in python
- How to use Kalman filter in Python for location data?
- Getting CPU temperature using Python?
- How do I count the number of characters in a code using accumulation pattern without using len()?
- Error message: “‘chromedriver’ executable needs to be available in the path”
- python pandas remove duplicate columns
- Using Python 3 in virtualenv
- Pandas groupby multiple fields then diff
- Remove duplicates from dataframe, based on two columns A,B, keeping row with max value in another column C
- Django download a file
- How do I forward-declare a function to avoid `NameError`s for functions defined later?
- Concatenate a list of pandas dataframes together
- How do I convert strings in a Pandas data frame to a ‘date’ data type?
- Kivy not working (Error: Unable to find any valuable Window provider.)
- pandas logical and operator with and without brackets produces different results [duplicate]
- Project Euler 5 in Python – How can I optimize my solution?
- writing double quotes in python
- Django Rest Framework – Could not resolve URL for hyperlinked relationship using view name “user-detail”
- Django 1.7 – makemigrations not detecting changes
- What is the difference between subprocess.popen and subprocess.run
- How to get current date and time from GPS unsegment time in python
- What causes `None` results from BeautifulSoup functions? How can I avoid “AttributeError: ‘NoneType’ object has no attribute…” with BeautifulSoup?
- Flask URL Route: Route Several URLs to the same function
- Can’t import annotations from __future__
- How to add all images from a folder to a button (in my frame) [closed]
- string encoding and decoding?
- How to count top 10 most common values in a dict in python
- Adding a matplotlib legend
- Psycopg2, Postgresql, Python: Fastest way to bulk-insert