Functions


#1


Link-https://www.codecademy.com/courses/introduction-to-python-6WeG3/0/2?curriculum_id=4f89dab3d788890003000096

Error-
File "python", line 4
int p
^
SyntaxError: invalid syntax

code-

#include<stdio.h>
#include<conio.h>
{
 int p ;
 printf("enter the value of p\n");
 scanf("%d",&p);
 p=10
 }

https://www.codecademy.com/courses/introduction-to-python-6WeG3/0/2?curriculum_id=4f89dab3d788890003000096


#2

this doesn't look very python-ish, this looks like C

where is your int main function?


#3

Then also it is showing error

By the way i m begginer
So i m facing small hurdles


#4

but you can't run C code in a python interpreter? That will go wrong

you took a picture of your screen using a camara? You never heard of print screen? There should be a button on your computer for this, and then you can just paste this image directly to the forum


#6

So can you help me out of these?

Code in python language..


#7

well, if you want to code in python, you need to use python syntax. Sort of like real languages, try to speak english (C syntax) to a french person (python interpreter) won't work given the french person won't understand a word you are saying


#9

Please recommend a list of python syntaxes


#10

the python course? Courses on other sites? Official python docs? So many sources for python syntax


#11

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.