Questions tagged [jes]

The (JES)Jython Environment for Students is a full-featured media computation environment for programming in Jython. It includes facilities for programming, debugging, and media examination. JES also comes with an extensive multimedia API, enabling easy and rapid manipulations of sounds, images, and on some platforms, video.

177 questions
-1
votes
1 answer

Unexpected error , Inappropriate Argument value ( or correct type)

Excuse my poor formatting this is my first post. I'm simply trying to get my list as a float and to display accordingly. However I'm greeted with this error code. The error was: 1.91.6 Inappropriate argument value (of correct type). An error…
XNikXX
  • 15
  • 5
-1
votes
1 answer

Stuck on calling a variable

I'm new to JES and I'm stuck on this, I'm sure my coding is wrong. If I entered my age as 21 I want the 2 allocated to variable a and 1 allocated to variable b. Any help would be most appreciated. def makeSound(): picture=makeEmptySound(10 *…
-1
votes
1 answer

How to changed colours of some pixels of an image?

I'm trying to leave one third of the image stock, change all the black to yellow in the middle, and change the bottom third black to blue. I know how to change the colours, the problem I'm facing is I'm unaware of how I can select only one third of…
-1
votes
2 answers

How to turn on Color Wrap in JES

I can't find the answer t this anywhere. I am using JES. I am creating function with images. I need the color values to wrap; for example: if red = 250 250 + 20 = 15 instead of 250 + 20 = 255 Can anybody please tell me, how I can achieve this?
user3956566
-2
votes
2 answers

Comparing a list of lists to a list in python

I'm trying to to compare a list of lists to a simple list in JES This is a sample of the data that im trying to compare list1 = [(1, 'abc'), (5, 'no'), (5, 'not'), (10, 'which')] list2 = ['not', 'which', 'abc'] Basically what i'm doing is…
rob
  • 13
  • 4
-2
votes
2 answers

How do I add the BMI calculation to the following code?

So heres my code below: def inForm(): name = requestString("What is your name?") age = requestInteger("What is your age?") height = requestInteger("What is your height?") weight = requestInteger("What is your weight?") print "Hello", name,…
-2
votes
1 answer

How do I calculate a grey value at reference point?

I need to Calculate the grey value at reference point – The grey value of the pixel is the average of its red, green and blue values. For instance, in the example the RGB values of the reference point at this stage would be 151, 161 and 137.…
-2
votes
1 answer

Making teeth purple in a picture (JES)

What am I doing wrong? I have been trying to create a program for hours to change this man's teeth purple. def makeColor(picture): red=getRed(px) green=getGreen(px) blue=getBlue(px) (128 - red, 0 - green, 128 - blue) red =…
-2
votes
1 answer

How do I add a variable's value to a picture in JES/ Jython?

As per the topic, How do I add a variable's value to a picture? I have an image I want to add a variable's value to, and prefferably a word before and/ or after. The question's topic may be answerable from Jython/ Python knowledge as they sometimes…
jams
  • 39
  • 1
  • 1
  • 10
-2
votes
2 answers

Use while loop to scan through pixels in a picture

I can't figure out how to use while loops to scan through all the pixels. I can do it with for loops, but how to do it with using only while loops?? for x in range(0,width): for y in range(0,height): px =…
vinhdt
  • 1
  • 2
-3
votes
1 answer

Inappropriate argument value (of correct type). An error occurred attempting to pass an argument to a function

For A class that I am taking I need to create a Collage using three images. Whenever I try and run the program I get an error. "Inappropriate argument value (of the correct type). An error occurred attempting to pass an argument to a…
M Agrippa
  • 1
  • 1
-4
votes
1 answer

write a function in JES that will distinguish type of file is chosen

"Write a function that will obtain a file name (using pickAFile), and then recognise if it is a picture or a sound file, or even some other file type. The file should then be interpreted as either a picture, if its type is jpg (then print an…
Mark
  • 11
  • 3
1 2 3
11
12