15,148 Topics

Member Avatar for
Member Avatar for Tafadzwa_2

JQ is taking a car trip with his family. On the trip, he will stop for fuel, food or lodging. When stopping for gas, JQ will record the amount of fuel he is willing to pay for. When the family stops for lodging, they will also have a meal. JQ …

Member Avatar for rproffitt
0
78
Member Avatar for sravan953

Hey guys, I want to make a simple program which calculates speed, distance and time. This is the code I used: [CODE] a=input("1)Find speed\n2)Find distance\n3)Find time\n4)Quit\n") while a!=4: if a==1: d=input("\nEnter distance: ") t=input("Enter time: ") print ("Speed: "+str(d/t)+"\n") elif a==2: s=input("\nEnter speed: ") t=input("Enter time: ") print ("Distance :"+str(s*t)+"\n") …

Member Avatar for Smartfitness33
1
14K
Member Avatar for jozz3

I have to convert a piece of C++ code to Python. Except I can't understand what it's doing. This is the code: [CODE]#include <iostream> using namespace std; int calculate(int values[], int size) { int answer = 0; for (int 1 =0; i< size; i +=1) } answer += values[1]; } …

Member Avatar for Smartfitness33
0
8K
Member Avatar for ASD_3

Would anyone be able to help me, I am trying to make a C++ program which reads values from csv file and prints them(there are going to be three 4 rows, 3 columns). I want to know how can I add the rows (like the sum of the first row …

Member Avatar for Amber_12
0
273
Member Avatar for 辉

Flask State , A plug-in for displaying native state. It’s a better choice for new user. Github :https://github.com/yoobool/flask-state I would love to hear any good or bad feedback, suggestions for improvement, or just your general opinion.

Member Avatar for 辉
-1
35
Member Avatar for Miggy_1

Hi everyone! Do you know how to create Pizzeria Program using Python and PostgreSQL where it can keep track of the pizza orders and view the order information using Python and PostgreSQL? Technology needed: -Django for the program -Postgresql for database How it can be used: Every time there is …

Member Avatar for rproffitt
1
84
Member Avatar for MNSRAO

Hi i am computer science students. I always confused to about php base websites or another website. Yesterday my teacher gave me assingement to check website either it is php base or other platform. But i haven't decided to give answer. I am week student in class. please help me …

Member Avatar for rproffitt
-1
44
Member Avatar for Tuấn_4

hi guy! I started learn python with pandas , but now, i get the trouble so i cant understand what i should do with this trouble File "C:\Users\Administrator\site-packages\Ver6.py", line 3, in <module> abc = pd.read_csv('book2.csv') AttributeError: module 'pandas' has no attribute 'read_csv' Plz , someone help me coz i cant …

Member Avatar for Dani
0
27K
Member Avatar for Allison_5

import random money = 100 Ask user if they want to play or "QUIT" (.upper()) while game != "QUIT": 2 dice generate random numbers 1-6 on each (generate random numbers inside while loop) Every roll cost $3 Win $5 if total is 7 Win $10 for snake eyes Else display …

0
60
Member Avatar for HelpMeProgram!

I need help with my coding and I need to know how to configure my text for my button, Here is my code so far: class EyeSprite(Sprite): def __init__(self, game): Sprite.__init__(self, game) self.images = [ PhotoImage(file="C:\\Users\\John Magana\\Desktop\\Python Projects\\clicker game folder\\eye1.png") ] self.current_image = 0 self.current_image_add = 1 self.last_time = time.time() …

0
47
Member Avatar for LAZARUS21

write a Python function called sumList () which will receive a list of integers as input parameter.sumList() must: a)Print the list b)Sum all the numbers in a list and print the total. The main section of the program must: c)Ask the user how many numbers the list should contain; d)Create …

Member Avatar for rproffitt
0
43
Member Avatar for Muhammet

I am new at python. How can i translate this pseudocode to python? Thanks... ![Screenshot_1.png](https://static.daniweb.com/attachments/4/5e8c2ea0725682bc92b714cc5ea53d0f.png)

Member Avatar for Muhammet
0
842
Member Avatar for ricardosaul829

Hi everyone can someone help me translate this pseudocode to python? is for a branching diagram function R=Experimento() yk=U(); for ex=1,200 R(ex)=yk; ykm1=FG(yk,cm,lambda); yk = ykm1; (Store yk, a delay z^-1) endfor end function function FG(x)->y y = exp(-(x-cm)^2/lambda) end function

Member Avatar for rproffitt
0
55
Member Avatar for Luxiaoxian

def fib(num): if num<=1 return num return fib(num - 1) + (num - 2) num = int(input("enter a number higher than 0: ")) print(fib(i))

Member Avatar for John_165
1
76
Member Avatar for Robert_114

Python 3 programing, Plurality voting. Help Please!!! I need the code for this type of voting method in python 3. I attached the csv file, also the name of the csv file is heroes.csv. https://drive.google.com/file/d/1ObV7L9FVM-Bdek26YTzS8IzHKQsZx-rT/view?usp=sharing Plurality voting This is the conventional one person, one vote method we use today in …

0
37
Member Avatar for Jack Tarsh

I thought this would be a great place to post this opportunity for someone to join my start-up which is developing revolutionary technologies. Currently, we're developing software which takes advantage of apple's new Lidar technology. We are looking for a talented developer/ computer scientist to join our team for a …

Member Avatar for rproffitt
0
85
Member Avatar for Zimgold

The program must read a file with the format in which the first line contains the hourly rate and each subsequent line contains a start and end time for hours worked.for example 10.0 10:00 16:30 9:00 15:00

Member Avatar for rproffitt
0
35
Member Avatar for SAJIB_2

Hello, I'm seeking some suggestions for the issue below: Suppose I have multiple CSV files which including header. ID,NO,Date 1,200,2020-02-03 ........................... ........................... ......................... How can I process the CSV files so that each line of one CSV file will map to one object and then send N objects to an …

Member Avatar for SAJIB_2
0
163
Member Avatar for geek_lazy

So Im trying to prompt the user to enter strings until they enter an empty string. Then i want to add all the strings to a list and using recursion I want to print the reversed list to the screen. I keep getting 'None' printed instead. What am I missing …

Member Avatar for rproffitt
0
39
Member Avatar for kevlincred

Hi All, I would personally looking for someone from the US for a partnership. This will be something like a part-time job that needs 5 hrs per week. Requirements: US citizenship for legal issues. Basic understanding of technical - Junior Full-stack (web and mobile development) Experience working remotely. Open-minded and …

Member Avatar for rproffitt
0
72
Member Avatar for Choi_96

The selected row keeps on deselect when the new value is updated in that position. Can we just keep the selection fixed even when the row value changes. Please have a look at the sample code given below, where a treeview row are getting updated every second but as the …

Member Avatar for rproffitt
0
62
Member Avatar for littleme2202
Member Avatar for twitch1411

leaderboard = open("scores.txt", "r") scores = leaderboard.readlines() rawscores = [] for lines in scores: details = lines.rstrip("\n") #removes empty space details = details.split(",") #splits apart data with a comma at each space details[0] = int(details[0]) rawscores.append(details) rawscores.sort(key=lambda x: x[0], reverse=True) #sorts data from highest to lowest print("1. "+str(rawscores[0][0]),"done by",str(rawscores[0][1])) print("2. …

Member Avatar for rproffitt
0
22
Member Avatar for baraka.arman

Hi everyone! i have Fedora 28 (with xfce) installed on my laptop. As Fedora 28 is now an old version, I'd like to know if there is a way to upgrade directly to Fedora 32, with no risk (I mean no data loss, in particular my /home dir).. Can you …

Member Avatar for rproffitt
0
20
Member Avatar for rafyemokna
Member Avatar for Tcll

Truthfully it isn't really that special, but it is a bit cancerous as I only have `atan()` and not `atan2()`... What's special about it is every other function I see seems to be intrinsic with 1 axis needing a `sqrt()` to manage singularities, where what I'm looking to achieve is …

Member Avatar for rproffitt
0
297
Member Avatar for pwolf

i was on the site pyschools working through the exercises, but i dont understand why it wont accept the code i input. [url]http://www.pyschools.com/quiz/view_question/s4-q2[/url] Create a function generateNumbers(start, end, step) that takes in three numbers as arguments and returns a list of numbers ranging from start to the end number (inclusive)and …

Member Avatar for Reverend Jim
1
1K
Member Avatar for srednausab

want to sent an AuthnRequest from my python-based SP (I;m using python 2.7) that I'm developing to my simpleSAMLphp installation (it's an IDP). I'm using the "requests" module to do a get like this: response = requests.get(url, verify='/home/me/my.crt') where the URL is: https://bingo.bas.com/simplesaml/module.php/core/authenticate.php?as=example-sql/?SAMLRequest=' + saml_request_base64 and the saml_request is (but …

0
21
Member Avatar for Reverend Jim

Sometimes you want to ensure that only one copy of a script can be run at time. Windows provides a facility called a mutex and you can use it to prevent multiple instances. To create the mutex, all I have to do is varname = GetMutex() If the mutex already …

1
2K
Member Avatar for vishwas_1

Hii ,I was making a factorial program in python using recursion/ but I have one doubt : if I run the program I get the error as : " result=x*fact(x-1) TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'" But If I run it with the commented statements it works …

Member Avatar for Reverend Jim
0
703

The End.