Questions tagged [python-3.3]

For issues that are specific to Python 3.3. Use the more generic [python] and [python-3.x] tags where possible.

Python is a dynamically and strongly typed programming language whose design philosophy emphasizes code readability. Two significantly different versions of Python (2 and 3) are in use.

Use this tag if your question is specifically about . If your question applies to Python in general, use the tag . If your question applies to Python 3.x but not to Python 2, use the tag . If you aren't sure, tag your question and mention which version you're using in the body of your question.

Python 3.3 was released on September 29, 2012, and has a number of new features:

Syntax:

  • The yield from expression for generator delegation is introduced.
  • The u'unicode' syntax (which disappeared in Python 3.0) returns.

New standard library modules:

  • faulthandler - helps debugging low-level crashes.
  • ipaddress - high-level objects representing IP addresses and masks.
  • lzma - compress data using the XZ / LZMA algorithm.
  • unittest.mock - replace parts of your system under test with mock objects.
  • venv - Python virtual environments, as in the popular virtualenv package.

... as well as a reworked I/O exception hierarchy, rewritten import machinery based on importlib, more compact unicode strings, and more compact attribute dictionaries.

The C Accelerator for the decimal module has also been significantly improved, as has the unicode handling in the email module.

Finally, for security reasons, hash randomization is now switched on by default.

1158 questions
-4
votes
1 answer

How to fix this code to do with correct answers on a quiz

I'm working on my NEA assessment and I can't seem to fix this bit of code here. The code provides the artist name (in this case BTS) and the first initial of a song (F for Fire). When I type Fire, it comes up as incorrect. Not entirely sure what to…
-4
votes
1 answer

Python error: keyword can't be an expression. print value

I am making a game that has a fake loading screen in the beginning. I am trying to make a gradual elipsys that adds a period every second until there are 3 periods. this is the code I put in: def intro2(): print('Loading CapsuleCorp…
-4
votes
1 answer

insert letter before vowel in word

how to insert letter before vowel in each word in python. like Gibberish game. We have to ask user to to input some letter and input their word to insert some letter that they input at first to before vowels in each word they input at second.
-4
votes
1 answer

Unexplainable error regarding NoneType

I am trying to access a global variable in a function however it seems to believe it to be NoneType. Any help? The error seems to believed that the dictionary 'students' is NoneType and it is not reading it as a global variable even though I tell it…
-4
votes
1 answer

Menu 1,2,3,4 Options

I asked this earlier but it was not answered (my fault, I didn't put a question). I need to make a menu with 4 options but I do not know how to link the user_input to the actual 1,2,3,4 programs. Please help.... Chelsea_Salaries_2014 = {'Jose…
-4
votes
2 answers

Write a procedure that allows a person to input a player's name and change their salary

This is how far I have got with this but I am not sure how to call the procedure again: Chelsea_Salaries_2014 = {'Jose Mourinho':[53, 163500, 'Unknown']} Chelsea_Salaries_2014['Eden Hazard']=[22, 185000, 'June 2017'] Chelsea_Salaries_2014['Fernando…
-4
votes
1 answer

How to find the difference between two variables in python 3.3.2

I have been creating code for a small game for a project and have run into a small error which I can't fix, so I was wondering whether someone can help me. The code needs to find the differences between two variables input by the user, here is the…
Charlie1995
  • 27
  • 1
  • 6
-4
votes
1 answer

In Python I need a to_secs function to convert into seconds

I need help with writing a function to_secs that converts hours, minutes, and seconds to a total number of seconds. In the book it says the following test should be possible: to_secs(2, 30, 10) == 9010
-4
votes
1 answer

converting lambda function to python 3

I have this code and i read something about converting python 2 to python 3, but I have problem with it. lambda(k, val): (k, re.sub("&(#\d+|#x[0-9a-fA-F]+|\w+);", …
user2771714
  • 309
  • 1
  • 3
  • 15
-4
votes
1 answer

What's wrong with this Python for loop list code?

I'm trying to get the primes out of it, and it's behaving strange, it's not doing what it's saying...can't figure it out, could it be the indentation? This code return just 0 and 9 as primes. It says it's removing 9 but it's not. But it's removing…
Andra
  • 39
  • 1
  • 8
-4
votes
3 answers

How to install Cocos2d (Python) into Python 3.3?

I am trying to use Python 3.3 when developing my next game using Cocos2d. I succeeded in installing Pyglet (a Cocos2d dependency) in Python 3.3 but failed to do so for Cocos2d. The Cocos2d project page lists Python 2.6 as a requirement, but from…
swdev
  • 4,367
  • 8
  • 53
  • 94
-4
votes
1 answer

How to fix Overflow: Math range error

Whenever I enter in this code, I get an OverflowError: math range error at the 4th line. How do I fix it? x=0 while True: x=int(x)+1 first_root=first_root-((a*(math.pow(first_root, 3)))+(b*(math.pow(first_root, 2))+(c*first_root)+d)/(3*(a* …
user2442129
  • 1
  • 2
  • 3
-5
votes
1 answer

what does 'int' object is not subscriptable mean?

After some research I still do not know what 'int' object is not subscriptable means, all help will be appreciated.
jack lloyd
  • 9
  • 1
  • 1
  • 4
-5
votes
1 answer

Python -- divisibility and count

Okay, editing for clarity, sorry about the confusion. I need to count the number of occurrences of a number (we'll say 2) between 1 and n (user inputted positive number). That includes each time given number can go into each number between 1 and…
-5
votes
1 answer

urllib2.urlopen - error opening url

I have the following written in wing101 and python 3.3.2 def open_page(url): """Open the URL string given and return its contents as file.""" page = None increment_num_calls() cont = False while not cont: try: …
1 2 3
77
78