Installation issue with Python 3.6.2.

2017-09-05 Thread V Vishwanathan
 For the past 8/10 hours I have been trying to install the above version 
without any success.

My O/S is windows 10 free upgrade from win 8.1

Every time I try to install, I simply get a message as per screen grab attached.

I did have a version of 3.61 installed prior to upgrade to win 10, but somehow

it got corrupted ,and I simply uninstalled, and just not able to install again.

When I try the "Modify" option in the screen grab it proceeds and simply hangs

at " pre version"??

I will appreciate any help.

Than you,

Venkat



Sent from Mail for Windows 10


-- 
https://mail.python.org/mailman/listinfo/python-list


Questions.

2017-09-08 Thread V Vishwanathan
Hi, From what I see in the recent 4/5 digests, this forum seems to be for 
advanced

and professional programmers.

So wondering if a newbie can post some questions to understand errors in his 
code

or will it look silly?

 Thanks,

Venkat
-- 
https://mail.python.org/mailman/listinfo/python-list


Key Error: "city"

2017-09-08 Thread V Vishwanathan
(1) Trying to convert concatenated string to .format method
(2) concatenated string >>
[#todo rewrite this line to use the format method rather than string 
concatenation
alert = "Today's forecast for " + city + ": The temperature will range from " + 
str(low_temperature) + " to " + str(high_temperature) + " " + temperature_unit 
+ ". Conditions will be " + weather_conditions + "."]

(3) My code:
city = "Seoul"
high_temperature = 18
low_temperature = 9
temperature_unit = "degrees Celsius"
weather_conditions = "light rain"
alert = "Today's forecast for {city}: The temperature will range 
from{low_temperature} "" to ""{high_temperature}{temperature_unit}Conditions 
will be 
{weather_conditions}".format(city,low_temperature,high_temperature,temperature_unit,weather_conditions)
print(alert)

(4) output:

Traceback (most recent call last):
  File "D:\python exercises\uda format1.py", line 6, in 
alert = "Today's forecast for {city}: The temperature will range 
from{low_temperature} "" to ""{high_temperature}{temperature_unit}Conditions 
will be 
{weather_conditions}".format(city,low_temperature,high_temperature,temperature_unit,weather_conditions)
KeyError: 'city'

 (5) Tried Google but not much help.

So would appreciate any help.
Thanks,
Venkat
-- 
https://mail.python.org/mailman/listinfo/python-list