0

Python

How to translate this C++ code to Pyhton? Help. using namespace std; class Node { public:     int roll;     string Name;     string Dept;     int Marks;     Node* next; }; Node* head = new Node(); bool check(int x) {     if (head == NULL)         return false;     Node* t = new Node;     t = head;     while (t != NULL) {         if (t->roll == x)             return true;         t = t->next;     }       return false; }

7th Oct 2021, 5:49 PM
HAPPY
HAPPY - avatar
2 Answers
0
Either 1) Rewrite it yourself, if this is your own code then you shouldn't have an issue rewriting it in another language, especially one as easy as python. or 2) Use an online c++ to python translator
7th Oct 2021, 9:57 PM
Jibraeel Abdelwahhab
Jibraeel Abdelwahhab - avatar
0
This is not my code, I am only studying python. I never tried C++. Would you help me.
8th Oct 2021, 11:29 AM
HAPPY
HAPPY - avatar