Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: SUBLIMEREPL Issue
Post: SUBLIMEREPL Issue

try: n = int(input("Enter an Integer: ")) except ValueError: print("That is not an integer")So i wrote this code and then went to tool>SublimeREPL>Python> Python-RUN current File It keeps...
aditvaddi Homework 0 1,676 Jul-26-2018, 11:56 PM
    Thread: Function producing no result
Post: Function producing no result

def Tester(): condition = 10 while condition !=0: continue condition = condition -1 if condition == 0: print ("You got it right") else: print("you got it wrong") Tester()When i execute th...
aditvaddi Homework 2 2,712 Jul-09-2018, 11:35 PM
    Thread: Nested Functions
Post: Nested Functions

a,b,c = 5,2,3 def f(a): def g(b): def h(c): return a*b*c return h return g print(g) f(a) I'm trying to created nested functions such that the function f includes a print function and when w...
aditvaddi Homework 1 2,610 Jun-26-2018, 12:07 AM
    Thread: While & For Loops
Post: While & For Loops

while True: for i in range(1,5): if i==3: continue print("{:>2}SAM".format(i))For this piece of code, why does it infinitely print out only 4SAM instead of infinitely doing: 1SAM 2SAM 3SAM 4...
aditvaddi Homework 2 2,904 Jun-22-2018, 02:51 AM
    Thread: creating a 3x3 multiplication table
Post: creating a 3x3 multiplication table

So im trying to get this as the output: Output: 1 2 3 1| 1 2 3 2| 2 4 6 3| 3 6 9Here's the code i'm using: print(''' 1 2 3''',end="") for i in range(1,4): if i==1: print("") print('{:>1}|...
aditvaddi Homework 1 3,621 Jun-18-2018, 02:45 AM
    Thread: For Loops & Variables
Post: RE: For Loops & Variables

@Larz, what im failing to understand is that when we define a variable with a string, it clear how the loops run, but here the variables arent defined so then why are integers produced in the output?
aditvaddi Homework 4 3,338 Jun-18-2018, 12:03 AM
    Thread: For Loops & Variables
Post: For Loops & Variables

for i in range(3): for j in range(2): print(j)I don't understand how the output of this is: 0 1 0 1 0 1 -why do those variables contain these integer values already? Thats the only part i...
aditvaddi Homework 4 3,338 Jun-17-2018, 11:07 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020