GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - hemanthravula5674/Java-to-Python-Transcoder: MSCS 271 - Formal Languages and Finite Automata Final Project

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

96 Commits
96 Commits

Folders and files

NameName
Last commit message
Last commit date
Planning Pictures
Planning Pictures
 
 
Tokens
Tokens
 
 
.DS_Store
.DS_Store
 
 
.gitattributes
.gitattributes
 
 
FinalProject.code-workspace
FinalProject.code-workspace
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
Test1.java
Test1.java
 
 
Test1.py
Test1.py
 
 
Transcoder.java
Transcoder.java
 
 
testJavaCode.java
testJavaCode.java
 
 
variableInteractionsTest.java
variableInteractionsTest.java
 
 

Repository files navigation

FinalProject

MSCS 271 - Formal Languages and Finite Automata

Chris Allender
Keenan Leverty
Peter Matern

Instructions

Simply run the .java file and input your java code to get the python equivalent.

Accepted functions:

  • Variables:
    • Int
    • Double
    • String
    • Character
    • Array
    • Boolean
  • Arithmetic operations
  • Conditionals
  • Loops
  • Scanner input
  • System output

Example input and output:

Java Input:

import java.util.Scanner;
public class Test1 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int bigNumbers = 0;

        System.out.println("Hello world!");

        System.out.println("Please enter a number:");
        int input = sc.nextInt();

        String output = "\n\n";

        for(int i = 0; i < input; i++) {
            output += i + " x 4 = " + i*4 + "\n";

            if(i > 5) {
                bigNumbers += 1;
            }
        }

        System.out.println(output);
        System.out.println("There were " + bigNumbers + " big numbers!");

        sc.close();
    }
}

Python Output:

bigNumbers=0
print("Hello world!")
print("Please enter a number:")
input=input()
output="\n\n"
i=0
while i<input :
	output+=i+" x 4 = "+i*4+"\n"
	if i>5 :
		bigNumbers+=1
	i += 1
print(output)
print("There were "+bigNumbers+" big numbers!")

About

MSCS 271 - Formal Languages and Finite Automata Final Project

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.