15,181 Topics
| |
Write a Python function maxaceregate(!) that takes a list of pairs of the form (name score) as argument, where name is a string and score is an Integer Each pair is to be interpreted as the score of the named player For instance, an input of the form [CKohir 73) … | |
Hi When I run main.py I got this error how can I fix it? I'm using https://github.com/PicciMario/iPhone-Backup-Analyzer-2 / Traceback (most recent call last): File "./main.py", line 44, in <module> from PySide import QtCore, QtGui ImportError: No module named PySide I appreciate your help | |
The datetime module provides date and time objects that are similar to the Date and Time objects, but they provide a rich set of methods and operators. Read the documentation at http: // docs. python. org/ 2/ library/ datetime. html 1. Use the datetime module to write a program that … | |
# What Are Voronoi Diagrams? # Voronoi Diagrams are an essential visualization to have in your toolbox. The diagram’s structure is a data-driven [tessellation](https://en.wikipedia.org/wiki/Tessellation) of a plane and may be colored by random or to add additional information. ## Learn the Lingo ## The set of points that generate the … | |
I have written the following Tkinter script: When I run it, the first thing that happens is the File Dialog box opens without it being called. I am expecting the file dialog box only to open when the "Open Document" button is pressed. import tkinter as tk from tkinter import … | |
Hello there , can anuone help me with this? Write a Python program which takes a sequence of inputs that contain lists of grades of some students (each student info is presented in one line) and some query items. Input data will contain the total number of students, i.e. M_STUDENTS, … | |
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 … | |
| 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") … |
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]; } … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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() … | |
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 … | |
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) | |
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 | |
| 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)) |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … |
The End.