How to run 2 scripts on one lage with 2 different outputs | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to run 2 scripts on one lage with 2 different outputs

21st Feb 2022, 8:38 PM
Aslam Pathan
6 Answers
+ 2
Maybe by merging them together ? Or by running each individually ? Can you explain what are you trying to do ?
21st Feb 2022, 8:49 PM
Ervis Meta
Ervis Meta - avatar
0
Actually i am stucked on a practice page there are 2 cases i can get only one case's output the app is asking for both case's output what should i do
21st Feb 2022, 8:52 PM
Aslam Pathan
0
if it is Fizz-Buzz: n = int(input()) for x in range(1, n): if x % 2 != 0: if x % 3 == 0 and x % 5 == 0: print("SoloLearn") elif x % 3 == 0: print("Solo") elif x % 5 == 0: print("Learn") else: print(x) else: continue # this is my first attempt
21st Feb 2022, 8:57 PM
Ervis Meta
Ervis Meta - avatar
0
Ok thankyou so much
21st Feb 2022, 8:59 PM
Aslam Pathan
0
This is a question Write a program to take x and y as input and output the string x, repeated y times. In first case x=cool Y=2 And second case X=a Y=8 Now i want to run this both program on one page what should i do?
21st Feb 2022, 9:04 PM
Aslam Pathan
0
#that's easy: # function that does what you want (including type error check): func = lambda a,b: a*b if (type(a)==str and type(b)==int) else None print(func('cool',2)) print(func('a',8)) print(func(2,3))
21st Feb 2022, 9:12 PM
Ervis Meta
Ervis Meta - avatar