Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Lists
Post: Lists

I just started lists and i'm having a very hard time, i need a program that reads a list and two values(superior and inferior) then it prints the values of the list in the interval [inferior,superior]...
RiceGum Homework 1 27,920 Nov-21-2017, 10:17 PM
    Thread: Functions to remove vowels and extra blanks
Post: RE: Functions to remove vowels and extra blanks

Thanks a lot!
RiceGum Homework 10 5,876 Nov-17-2017, 02:51 PM
    Thread: Functions to remove vowels and extra blanks
Post: RE: Functions to remove vowels and extra blanks

Did that! Thanks! Getting this error: Traceback (most recent call last): File "C:\Users\Utilizador\Desktop\5.2.py", line 58, in <module> x = eraseVowels(x) File "C:\Users\Utilizador\Des...
RiceGum Homework 10 5,876 Nov-17-2017, 02:32 PM
    Thread: Functions to remove vowels and extra blanks
Post: RE: Functions to remove vowels and extra blanks

That just gives me the string that i wrote or maybe i joined the programs wrong. Can you add that part to your previous answer? Please, that would really be helpfull this is kinda urgent
RiceGum Homework 10 5,876 Nov-17-2017, 12:28 PM
    Thread: Functions to remove vowels and extra blanks
Post: RE: Functions to remove vowels and extra blanks

Thank you it is working! But i need something that looks like this: Example A: Input: Um cidadão ficou sem paciência ao esperar nas Finanças. O âmbito do atentado foi grande. Ouve 56 vítimas. Que ho...
RiceGum Homework 10 5,876 Nov-17-2017, 11:36 AM
    Thread: Functions to remove vowels and extra blanks
Post: Functions to remove vowels and extra blanks

Example A: Input: Um cidadão ficou sem paciência ao esperar nas Finanças. O âmbito do atentado foi grande. Ouve 56 vítimas. Que horror! O coração foi o único órgão afetado, mas o doente não sobrevi...
RiceGum Homework 10 5,876 Nov-17-2017, 03:56 AM
    Thread: Polynomial value between a interval
Post: Polynomial value between a interval

n1 = eval(input()) n2 = eval(input()) (M, m) = (n1, n2) if n1 > n2 else (n2, n1) i = m while i < M: i += 0.5 print(3* i**3 -5*i + 0.8) if M == m: print(3*m**3 -5*m + 0.8)I'm gett...
RiceGum Homework 3 3,178 Oct-24-2017, 07:40 PM
    Thread: Sum up numbers using while(strings)
Post: RE: Sum up numbers using while(strings)

Can you make a suggestion then please?
RiceGum Homework 7 4,709 Oct-22-2017, 11:38 PM
    Thread: Sum up numbers using while(strings)
Post: RE: Sum up numbers using while(strings)

My teacher said the program had to read numbers line by line until the user writes a stop("."). Then it should print how many numbers you printed(contador) and the sum of all the numbers. p = 0 is a c...
RiceGum Homework 7 4,709 Oct-22-2017, 10:59 PM
    Thread: Sum up numbers using while(strings)
Post: RE: Sum up numbers using while(strings)

But i need a string in this case "." to stop the program and print the sum and count of numbers. How do i solve this then?
RiceGum Homework 7 4,709 Oct-22-2017, 08:03 PM
    Thread: Polynomials
Post: Polynomials

I need to write a program that reads two numbers. Than used them in this polynomial: 3*x**3 - 5x + 0.8 and calculate all the values between them with a step of 0.5. I used range (value, value, 0.5). B...
RiceGum Homework 4 3,865 Oct-22-2017, 06:21 PM
    Thread: Sum up numbers using while(strings)
Post: Sum up numbers using while(strings)

a = input() p = 0 contador = 0 while a != ".": a = input() contador = contador + 1 if a == ".": print(contador) print(p + a)I need to write a program who reads number line by line unti...
RiceGum Homework 7 4,709 Oct-22-2017, 05:44 PM
    Thread: Error with conditionals
Post: RE: Error with conditionals

Got it! Thanks a lot! One question, in this case it needed to be indented one more time to only be atached to the if mes == "Fevreiro"?
RiceGum Homework 17 7,198 Oct-18-2017, 01:33 AM
    Thread: Error with conditionals
Post: RE: Error with conditionals

Traceback (most recent call last): File "C:\Users\Utilizador\AppData\Local\Programs\Python\Python36-32\mes e dias.py", line 12, in <module> if n%400 == 0 or n%4 == 0 and n%100 != 0: NameEr...
RiceGum Homework 17 7,198 Oct-18-2017, 12:30 AM
    Thread: Error with conditionals
Post: RE: Error with conditionals

Percentage means the rest of the division. February has 29 days if n%400 == 0 or n%4 == 0 and n%100 != 0. n = any year you put(1900, 2017)
RiceGum Homework 17 7,198 Oct-17-2017, 11:36 PM
    Thread: Error with conditionals
Post: RE: Error with conditionals

I'm sorry. I'm really not seeing what you mean by that. Sorry for the trouble. Could you elaborate? "Whatever it has before it, put that in front of those four lines" That means to put what is before ...
RiceGum Homework 17 7,198 Oct-17-2017, 10:07 PM
    Thread: Error with conditionals
Post: RE: Error with conditionals

if n%400 == 0 or n%4 == 0 and n%100 != 0: print ("29 dias") else: print("28 dias") these lines? "So indent those last four lines one time each" how do i do this?
RiceGum Homework 17 7,198 Oct-17-2017, 09:06 PM
    Thread: Error with conditionals
Post: RE: Error with conditionals

mes = input() if mes in ("Abril", "Junho", "Setembro", "Novembro"): print("30 dias") elif mes in ("Janeiro", "Março", "Abril", "Maio", "Julho", "Agosto", "Outubro", "Dezembro"): print("31 dias") elif...
RiceGum Homework 17 7,198 Oct-17-2017, 07:44 PM
    Thread: Error with conditionals
Post: RE: Error with conditionals

I don't understand the instructions. Can you help me? I would really apreciate it. The code is as you see it, can you run it on python and try to see what's wrong?
RiceGum Homework 17 7,198 Oct-17-2017, 06:54 PM
    Thread: Error with conditionals
Post: RE: Error with conditionals

mes = input() if mes in ("Abril", "Junho", "Setembro", "Novembro"): print("30 dias") elif mes in ("Janeiro", "Março", "Abril", "Maio", "Julho", "Agosto", "Outubro", "Dezembro"): print("31 dia...
RiceGum Homework 17 7,198 Oct-17-2017, 01:17 AM

User Panel Messages

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