Sesiones de PyR
When Bongi's new baby, Sipho, was born,she opened a savings account woth R1000.00. On each daybitthday,starting with the first,the bank added 4.5% of the balnce and Bongi added another R500.00 to the account.Write a loop that will calculate how much money was in the account on Sipho's 18th birthday?
0 Votos
2 RespuestasHey there,
I don't know why, but when I import tkinter on IDLE like this:
from tkinter import *
And I say:
window = Tk()
Even known I use python 3.2.5, which should be able to use Tkinter, the python shell raises a ValueError that says that Tk() is not defined. I am very sure I use python 3.2.5 and tutorials from the Python Foundation say that is what I have to do. But it still doesn't work.
Does anyone have an idea of how to solve this problem? Thank you!
0 Votos
3 Respuestascan someone tell me how to make it impossible for a user to type a 'userchoice1[x]' value that does not range from 1 - 10.
If you also know a way I can make the user input another value for the 'userchoice1[x]' variable if it is less than 1, I'll appreciate you share the knowledge with me.
please see the short code below
1 Voto
2 RespuestasIn the short code below, I declared an array of five elements. But I'm getting confused on how to use it in a while loop. My main question is , if the user inputs a userchoice1 value that is less than 1, I want the code to keep looping until the user inputs a number that is not less than 1. But I don't know if the 7th line (userchoice1 [x]++) shows the right way to loop it.
1 Voto
2 Respuestasdef add(x, y):
return x + y
def do_twice(func, x, y):
return func(func(x, y), func(x, y))
a = 5
b = 10
print(do_twice(add, a, b))
Please explain step by step
Which is caller here?
Explain the 3rd and 4th line ?
why in 4th line we write add(add(x,y),add(x,y)) which is function of 1st line ?
how can we write function after return statement insted of (x+y+x+y )=30?
0 Votos
2 RespuestasI have a project in school and i want to add some login functions. know im planning to make an external js and there i will get the input of the user.In the login button i will put there the username input but how do i cancel the funtion if the users input is null and where should i put these method
THANKS FOR THE FUTURE HELP :)
0 Votos
2 Respuestaswhat languages are needed to allow customers to upload a form to a server, which can then be displayed on another page (Similar to ebay). i cant wrap my head around what code is needed (other than the method=post)...i have created a database using sql but cant make sense of how to allow a user to enter details...for it to then appear on the home page of my website for example. many thanks!
0 Votos
2 RespuestasI have 10 variables called, int1, int2, int 3 and so on. The user can write one number into the console. If the user types 7, I want to add 3 to the value of int7. how do I do this without 10 if statements? can I somehow do something like, (int + "userinput") += 3?
thank you for your help! :D
0 Votos
2 RespuestasTo bind two things of similar origin but separate identities together as one unit with ability to function independently as long and the unit is not corrupted. How to set x to get y and become z permanently and protect the unit from corrupt or deviation or denying or hiding while z securely functions actively is the purpose.
0 Votos
1 Respuesta