Python Forum
Arithmetic exercice with python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Arithmetic exercice with python
#1
Hello Guys,

I have an arithmetic exercice and I am stuck.

"Your program should read the number of students that can hold a room, then the number of students. Finally, it must display the number of rooms to reserve to hold all the students"

Example
entries :
5
29
output :
6

Here is my code : (nbEleveSalle will receive 5 and nbEleve will receive 29)
nbEleveSalle = int(input())
nbEleve = int(input())
résultat = (nbEleve//nbEleveSalle)+1
print(résultat)
The online plateform we use to validate our exercice, tells me this is not correct. Anyone have an idea please ? Thanks a lot
Reply


Messages In This Thread
Arithmetic exercice with python - by pythonuser1 - Apr-11-2020, 12:00 PM
RE: Arithmetic exercice with python - by Larz60+ - Apr-11-2020, 12:19 PM
RE: Arithmetic exercice with python - by jefsummers - Apr-11-2020, 02:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Arithmetic and python pythonuser1 1 2,320 Apr-12-2020, 07:11 PM
Last Post: pythonuser1
  Arithmetic Application design Emoji 1 2,295 Jul-23-2019, 11:16 AM
Last Post: jefsummers
  Arithmetic operations using lists yassine 2 3,028 May-02-2018, 06:20 PM
Last Post: j.crater
  Beginner - help for an exercice greed13 1 3,882 Dec-08-2017, 02:09 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

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