Python Forum
Problem with a homework
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with a homework
#2
your syntax error is the result of line 9 and 1 missing a closing parenthesis.

Also this is very non-pythonic code. Let alone not even runnable because some of it is not even valid python code. To be honest it looks like you never read a python tutorial ....like you just wrote C code with some python keywords and its indentation.

++ is not an operator in python and for good reason. You dont need to increment like you do in C/c++ so much. You loop over sequences element by element.

There is no type declarations in python so im not sure what this is suppose to be?
Quote:A[i]=int input

Use the format method for inserting variables into a string

Single char names are bad variables in any language. And capped names are meant for class names.
Recommended Tutorials:
Reply


Messages In This Thread
Problem with a homework - by Samuelcu - Feb-03-2018, 10:12 AM
RE: Problem with a homework - by metulburr - Feb-03-2018, 01:25 PM
RE: Problem with a homework - by Samuelcu - Feb-03-2018, 01:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  problem with a formula 1 kind of homework claroque 2 1,525 Jun-20-2023, 09:58 PM
Last Post: claroque
  Bakery Problem.. Can you Help My Homework Cemvrs 1 2,431 Jan-14-2022, 05:47 PM
Last Post: Yoriz
  Need help with a homework problem on logical operators voodoo 3 4,668 Jun-28-2019, 03:45 PM
Last Post: jefsummers
  Homework Problem csascott 1 2,328 Oct-27-2018, 04:44 AM
Last Post: scidam
  Homework Problem Travisbulls34 1 3,009 Sep-11-2018, 04:04 PM
Last Post: ichabod801
  Help with homework problem - iterating a function midnitetots12 4 3,595 Feb-21-2018, 10:51 PM
Last Post: nilamo
  Homework problem Dem_Prorammer 1 3,880 May-20-2017, 07:49 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020