Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Clock Program
Post: RE: Clock Program
(Nov-18-2017, 06:33 AM)heiner55 Wrote: Why do you prefer Python 2.x ?
Here is a Python 3.x version:
#!/usr/bin/python3
import tkinter as tk
import time
class Clock():
def update_timeText(self... |
|
AnjyilLee |
Homework |
3 |
7,117 |
Nov-20-2017, 12:33 AM |
|
|
Thread: Clock Program
Post: Clock Program
For my current assignment, I had to make a clock program:
class clock():
import Tkinter as tk
import time
def update_timeText():
current = time.strftime("%H:%M:%S")
time... |
|
AnjyilLee |
Homework |
3 |
7,117 |
Nov-18-2017, 05:12 AM |
|
|
Thread: Made a Class, How to Continue?
Post: RE: Made a Class, How to Continue?
(Nov-04-2017, 05:58 AM)buran Wrote: first step would be to make an instance of your class, something like:
my_awesome_car = Car(year_model=2017, make='Ferrari')and start 'driving' your awesome car, ... |
|
AnjyilLee |
Homework |
2 |
2,991 |
Nov-05-2017, 08:18 AM |
|
|
Thread: Made a Class, How to Continue?
Post: Made a Class, How to Continue?
Okay, the first part of my assignment was to make a Class called Car. I have done this with the data attributes and methods they told me to use:
class Car():
def __init__(self, year_model, make):... |
|
AnjyilLee |
Homework |
2 |
2,991 |
Nov-04-2017, 04:18 AM |
|
|
Thread: List with Random Numbers
Post: RE: List with Random Numbers
(Oct-14-2017, 07:03 AM)buran Wrote: Did you cover list comprehensions in class?
List comprehensions? Well, we've talked about lists, yes. |
|
AnjyilLee |
Homework |
5 |
9,445 |
Oct-14-2017, 09:17 PM |
|
|
Thread: List with Random Numbers
Post: RE: List with Random Numbers
(Oct-14-2017, 02:52 AM)metulburr Wrote: lottery_list is created in the function and only known in the function. You want to return that.
Move the import out of the function.
Loop the randoms numb... |
|
AnjyilLee |
Homework |
5 |
9,445 |
Oct-14-2017, 03:17 AM |
|
|
Thread: List with Random Numbers
Post: List with Random Numbers
For my homework, I need to make a lottery number generator, a program that generates a 7 digit lottery number, each digit generated on their own and between 0-9, then puts them in a list. By looking t... |
|
AnjyilLee |
Homework |
5 |
9,445 |
Oct-14-2017, 01:36 AM |
|
|
Thread: Learning and Looping
Post: RE: Learning and Looping
(Sep-22-2017, 01:57 PM)buran Wrote: The code provided by Sagar is Python3 code, while AnjuiLee is executing it on Python2.
In Python3 input is same as raw_input in Python2..
In Python2 input will ev... |
|
AnjyilLee |
Homework |
6 |
5,099 |
Sep-23-2017, 01:02 AM |
|
|
Thread: Learning and Looping
Post: RE: Learning and Looping
(Sep-21-2017, 11:50 AM)Sagar Wrote: 1.Define a function calculateExpense().
2.In that function, you have to input the monthly budget and store it in budget variable.
3.Input the monthly expense and ... |
|
AnjyilLee |
Homework |
6 |
5,099 |
Sep-22-2017, 12:27 AM |
|
|
Thread: Learning and Looping
Post: Learning and Looping
Posting this is both for figuring out my homework and to try learning the site's preferred way for me to format my questions. I've looked over the help posts on this topic, but I will only how learn h... |
|
AnjyilLee |
Homework |
6 |
5,099 |
Sep-21-2017, 04:47 AM |
|
|
Thread: Basic Coding Slays College Girl
Post: RE: Basic Coding Slays College Girl
(Sep-14-2017, 09:12 AM)Larz60+ Wrote: We will not write it for you.
Here's some Pseudo code to help:Begin function
Declare constant: loss_per_month = 4
Enter starting weight
Create empty list to ... |
|
AnjyilLee |
Homework |
5 |
4,810 |
Sep-14-2017, 10:37 PM |
|
|
Thread: Basic Coding Slays College Girl
Post: Basic Coding Slays College Girl
It is 4:30 in the morning. Been up since 8am yesterday and been running on 2 hours of sleep, coffee, and a Monster energy drink. I've seen that you guys have a certain format for asking questions, but... |
|
AnjyilLee |
Homework |
5 |
4,810 |
Sep-14-2017, 08:41 AM |