14,951 Topics

Member Avatar for
Member Avatar for Fitzwilliam_1

Two bank account: current and saving. User has to be asked to choose one, then withdraw money. How can I do a decrement of the balance each time I loop in this function?? if balance = 10 euro , withdraw 5 so remaining is 5. User is asked to quit …

Member Avatar for James Paul
0
229
Member Avatar for Vokeh

#this program calculates the area of a right triangle #ask for input b=input('Enter the triangle base:') h=input('Enter the triangle height:') #Calculate and print area Area=(b*h)/2 Print '\n The base is '+str(b) + 'units' Print 'The height is 'str(h) + 'units' Print '\n The area is 'str(area + 'units'

Member Avatar for ddanbe
0
125
Member Avatar for Fitzwilliam_1

Car Rental will rent cars to their customer. They have the potential to rent either petrol, diesel, electric, or hybrid cars. They have initially 40 cars in their rental pool made up of 50% petrol, 20% diesel, 10% electric and 20% hybrid. When a car is not rented it is …

Member Avatar for Fitzwilliam_1
0
2K
Member Avatar for vegaseat

You can put an image and text on a Tkinter button widget. This small code shows you how. The GIF image file you want to use for the button should be in the working directory, or you have to give it the full path. Incorporate the Python Image Library (PIL) …

Member Avatar for neon_3
1
23K
Member Avatar for Rajan_8

I am doing a mini project on Caesar cipher, I found one program but can't understand the 29th line "key = -key". Please help me. # Caesar Cipher MAX_KEY_SIZE = 26 def getMode(): print('Do you wish to encrypt or decrypt a message?') print("'e' for encrypt and 'd' for decrypt") while …

Member Avatar for Rajan_8
0
685
Member Avatar for Neethu_1

1) While working dates, when and why the local time and universal times are used? 2) Which multi-threaded program is recommended for reducing CPU usage? Why?

Member Avatar for Reverend Jim
0
154
Member Avatar for S._1

Hello everyone, I'm pretty new to python and I have found this code https://www.daniweb.com/programming/software-development/code/260268/restart-your-python-program to restart a python program. I have developed a little program and applied this function to it. By pressing a Button the function `resize()` is being called which triggers the `restart_program()` function. But when I start …

Member Avatar for Gribouillis
0
2K
Member Avatar for vegaseat

Just a relatively simple calculator using the Tkinter GUI. It has a few nice features such as correcting division by an integer (for older Python versions), error trapping, to and from memory buttons, and an editable display. The editable display allows you to backspace mistakes, and also to enter things …

Member Avatar for Charles_24
5
10K
Member Avatar for Mirty

python programming Your job for this question is to use Python turtle to draw any picture you'd like, making sure to meet the following requirements: Your code must use at least 1 if-statement, prompting the user to decide between 3 choices (e.g. colours, shapes, sizes, or anything else you'd like) …

Member Avatar for rproffitt
0
387
Member Avatar for long5001

Hi, I am trying to write a simple script that reads a file for two time stamps and then finds the delta. However, I can't get passed converting the time strings to datetime objects. I haven't done any coding since college and I everything I've read says this code should …

Member Avatar for long5001
0
964
Member Avatar for Vanessa_1

I need to make this python code to only take one parameter. Right now it takes multiple. def get_list(): return [input("Please enter a string: ") for i in range(int(input("Please enter the number of strings you want to input\n")))] def longest(lst): return max(lst, key = len) def alpha(lst): return [e for …

Member Avatar for Gribouillis
0
344
Member Avatar for paul_52

Hi there I am new to python. is there a program i could use to make a Clock with day and date in big fonts to help my gran with memory loss. regards Paul.

Member Avatar for paul_52
0
297
Member Avatar for zac202020

I am new to the forums and I am creating a Area Calculator for extra credit for a class I am in, but I am running into some problems. I have the program coded out the way it needs to operate I just can't seem to get it to loop …

Member Avatar for Gribouillis
0
4K
Member Avatar for Gribouillis

This snippet defines a function restart_program() which restarts your python program from within your python program.

Member Avatar for Gribouillis
5
74K
Member Avatar for Tcll

**Usage:** Provides a secure frontend object with restricted access to attributes of the backend object.

Member Avatar for Gribouillis
0
436
Member Avatar for Nether_1

I'm writing a python program that will search for a password that is the first piece in a string. I'm using raw_input() to do it, and here's what the code is like list = ['Nether\n'] password = list[0] print password if raw_input('Please Enter Password: ') == password: print "Successful" This …

Member Avatar for Gribouillis
0
365
Member Avatar for ayushi_3

I am learning python from "Learn Python The Hard Way", I came across a source code "from sys import argv" and got an explanation that sys is a module from where argv is imported. Although, sounds simple but still not able to understand the concept behind. I would like to …

Member Avatar for hastings.george.5
0
212
Member Avatar for Saif_7
Member Avatar for Estermont
Member Avatar for Dani
0
215
Member Avatar for dinilkarun

Hi, I am trying to open a large excel file (.xlsx) to ad some rows of data from another excel file. However, due to the size of the destination file i am getting the memory error. I tried the below, however when i create the worksheet object it is creating …

Member Avatar for ddanbe
0
2K
Member Avatar for Mark_64

I have a rock paper scissors code that works in python 2.7- it gives you 4 options (rock, paper scissors, or quit). However, I have to add a while loop to it and it somehow messes up my code whenever I add it. Can someone please help me? Thanks. import …

Member Avatar for slate
0
296
Member Avatar for Hi

how do i make a code that willfind the distance wether or not your speed is a float or an integer. please help i get no assistance in my class as techer is awful

Member Avatar for ddanbe
0
661
Member Avatar for Tcll

now I know your first thought is going to be rotation matrices, but take a moment to think about how they're applied... I'm wondering if there isn't something more efficient, or if there really needs to be that many operations per bone and vertex. I'm looking for the smallest data …

Member Avatar for Tcll
0
592
Member Avatar for Violated

I keep getting a sytax error but i can not find it. It does not highlight the area where it is at. I am still new to programming and need a little help on this one. If you need to see the whole code it is [Click Here](https://github.com/wes1696/Home_1/commit/290a6503a295e4e5a31b3d41f0898ad2dc4d5d25). user_input = …

Member Avatar for rproffitt
0
179
Member Avatar for mcroni

hi, i have managed to several different kivy apps on and i want them to run on different pcs but using a central server which wont be hosted online but within a connection. How can i go about this

Member Avatar for rproffitt
0
155
Member Avatar for Jeah_1

Help me create a code that will ask the user the guess the randomly generated integer by the computer using recursive function. Thanks!

Member Avatar for slate
0
174
Member Avatar for bmanzana

i am building a pong like game and cant seem to figure out how to add in a pause feature everything else works i have movement and collision detection, sound, game over and restart options but cant figure out how to pause the game any help would be greatly appreciated …

Member Avatar for shubham_9
0
9K
Member Avatar for tofi

HI I have .csv file which contains 3 columns ( feature 1 , feature 2 , class ) I need to take 13 row each time from f1,f2 with "1" at the end and save it into another .csv file so if the file contains f1 f2 class 1 1 …

Member Avatar for tofi
0
340
Member Avatar for Arpita_1
Member Avatar for Arpita_1
0
318
Member Avatar for massivefermion
Member Avatar for pty
0
503

The End.