Traditional Culture Encyclopedia - Weather forecast - There is an error in the code for obtaining weather forecast with python. Solve it.
There is an error in the code for obtaining weather forecast with python. Solve it.
First, find out the number of lines of code that went wrong.
Second, find out the variables that go wrong.
You print (type)? You can find that the variable is str? String type, can't participate in the calculation, so to convert to numerical type, generally use float (variable name)? If you want to change and correct the wrong line, you basically don't need to change anything else.
Personal advice:
1. Your python? The foundation seems a little weak, so study hard. Other modules need this foundation to be better used.
2.? Maybe you can have a look at the panda. Sometimes pandas are used for data analysis? Can save a lot of code, especially for people who have just learned python? Maybe it's easier to accept pandas? The unique grammar of.
Wealth value, if any, should be given to those who answer the above questions. Because his answer is correct.
- Previous article:What's the weather like in Kobe, Japan+00-165438+1October?
- Next article:Qtv now broadcasts TV programs in the afternoon.
- Related articles
- About the problem after the plasticine is dry.
- Bach, the little star, has an exclusive taste in the Old Testament because he knows the lyrics of The Wry Smile of Love Never Parting.
- Can I surf the Internet in thunderstorm weather?
- What is the coldest place in Peru in winter?
- Which city and which district is Qiemo County in Bayinguoleng area of Xinjiang?
- How to cancel the renewal fee in real-time weather
- What major can I choose for the undergraduate course of atmospheric exploration?
- Beautiful sentences in drizzle
- Some questions about going to Xitang
- Where did HONOR add desktop weather?