Visual Studio 2015

misi

Growing Little Guru
Visual Studio Community

Download Community Free


Very nice tools there for the programming enthusiasts.


I made a mistake with the setup.
Did not choose "Custom" the interpreter for Python is missing.:shame
 

misi

Growing Little Guru
print"Hello World!"

print"Hello Again"

print"I like typing this."

print"This is fun."

print'Yay! Printing.'

print"I'd much rather you 'not'."

print'I "said" do not touch this.'


Yay...It's working! :ohyes:


Hello World!

Hello Again

I like typing this.

This is fun.

Yay! Printing.

I'd much rather you 'not'.

I "said" do not touch this.
 

foxidrive

Retired Admin
Get an Arduino* Mega256 - for once I could teach you. :satisfied

I'd love to get into it, but I need to buy a new brain first - coz the scarecrow? has mine.

MV5BMTU0MTA2OTIwNF5BMl5BanBnXkFtZTcwMzA0Njk3OA@@._V1_SY317_CR10,0,214,317_AL_.jpg


 

misi

Growing Little Guru
I'd love to get into it, but I need to buy a new brain first
Not really, Foxi.

If I can do it, you could do it:


Code:
print "Hello World!"
print "Hello Again"
print "I like typing this."
print "This is fun."
print 'Yay! Printing.'
print "I'd much rather you 'not'."
print 'I "said" do not touch this.'
print
print "Show 4!="
from math import factorial
print factorial(4);
print
print "Show 4^4="
from math import pow
print pow(65536,4);

Hello World!
Hello Again
I like typing this.
This is fun.
Yay! Printing.
I'd much rather you 'not'.
I "said" do not touch this.

Show 4!=
24

Show 4^4=
1.84467440737e+19
Press any key to continue . . .



It inserts a carriage return.
How not to insert it? No idea...
 

misi

Growing Little Guru
Getting closer:

Code:
print "Hello World!"
print "Hello Again"
print "I like typing this."
print "This is fun."
print 'Yay! Printing.'
print "I'd much rather you 'not'."
print 'I "said" do not touch this.'
print
print "Show 4!="
from math import factorial
print factorial(4);
print
print "Show 4^4="
from math import pow
print pow(65536,4);
print
print "Show 4!=", factorial(4);
print "Show 4^4=", pow(65536,4);

Hello World!
Hello Again
I like typing this.
This is fun.
Yay! Printing.
I'd much rather you 'not'.
I "said" do not touch this.

Show 4!=
24

Show 4^4=
1.84467440737e+19

Show 4!= 24
Show 4^4= 1.84467440737e+19
Press any key to continue . . .
 

aye-aye-Chris

Famous Word Swap Guru
Staff member
Code:
...
print factorial(4);
print
print "Show 4^4="
from math import pow
print pow(65536,4);

....

Show 4!=
24

Show 4^4=
1.84467440737e+19
Press any key to continue . . .



It inserts a carriage return.
How not to insert it? No idea...
print factorial(4):
print
print "Show 4^4=":
from math import pow
print pow(65536,4):

colon on the end?
 

misi

Growing Little Guru
Good try, thanks! I did it and think that Python is not going to be my favourite language.
The compiler isn't built in , there is only an interpreter in VS.
(There is one available from Python but it's hard to develop in VS and then compile with another software.)
 

foxidrive

Retired Admin
I did it and think that Python is not going to be my favourite language

Get an Arduino* Mega256

Quite seriously, I love scripting in the stuff I know but starting a new language to make big applications in is too hard - to learn the different syntax and rules, and initialisation and file handling and memory use, and all those pesky things in a language.

I did teach myself some HTML over recent months, but much of it is very simple and I create the HMTL files in a batch script anyway, so half of it was the stuff I love and am used to.

Just several days ago i added my first javascript routine to it :thud:

Python interested me many years ago, but I didn't go past installing it.
 

misi

Growing Little Guru
Quite seriously, I love scripting in the stuff I know but starting a new language to make big applications in is too hard - to learn the different syntax and rules, and initialisation and file handling and memory use, and all those pesky things in a language.
Once you are successfully over the first few lines it becoming easier.
Initialization is a very good thing.
In BASIC there is no such thing, very easy to make mistakes and wondering what's wrong?

alpha=10
beta= 20

print alfa+beta

The output is 20. Why???


In C++:

int alpha=20;
int beta=10;

cout << alfa+beta;//No more printf(); That was a hard nut.

Compiling it:
Line X Error. There is no such variable.

Today you don't have to worry about memory use there supposed to be enough.
It was very important in the time of .com files.
65536 bytes should include everything.

File handling is not that hard as long as you use text for reading-writing.
To do it in binary makes the disk usage more efficient but harder to program.
 

foxidrive

Retired Admin
The output is 20. Why???

Batch scripts do that same thing also.

I've written in BASIC dialects since my Electronics course back in 1979, where I also learned assembly using machine code. I did a fair bit of assembler on the Apple 2+ as well as the Applesoft basic.

My first computer was a Dick Smith Wizzard which had a basic cartridge too.

You can run rings around me with C++
 

aye-aye-Chris

Famous Word Swap Guru
Staff member
Very basic starter sketch with Arduino, text and compiled by the integrated development environment (IDE)
/* comment text field */
// Comment text for one line only

This first one is the very standard blink example - "blink" = "hello world"
______________________________________________________________________
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.

Most Arduinos have an on-board LED you can control. On the Uno and
Leonardo, it is attached to digital pin 13. If you're unsure what
pin the on-board LED is connected to on your Arduino model, check
the documentation at http://www.arduino.cc

This example code is in the public domain.

modified 8 May 2014
by Scott Fitzgerald
*/


// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
______________________________________________________________________
So I made it beat...
______________________________________________________________________
/*
Modified to a heartbeat 5 february 2015
by Chris P
*/

void setup() // the setup function runs once when you press reset or power up the board
{
pinMode(13, OUTPUT); // initialize digital pin 13 as an output.
}

void loop() { // the loop function runs over and over again forever
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(120); // wait for 0.12 of a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(300); // wait for 0.3 of a second
digitalWrite(13, HIGH);
delay(120);
digitalWrite(13, LOW);
delay(1200); // wait for 1.2 seconds
}
______________________________________________________________________
 
Back
Top