0

hi. i'm trying to convert program from c++ to pyhton, but i don't have any experience with python. can someone help me?

include <stdio.h>

include <conio.h>

main()

{   


  float uplata,i;  
  do  
  {   
      printf("Unesite pocetnu uplatu:");                
      scanf("%f", &uplata);   
      if(uplata>3000)   
      {   
           printf("Pocetna uplata ne smije biti veca od 3000 kuna.");   
      }   
  }    
  while (uplata>3000);    

  for(i=0;uplata<1000000;i++)    
          {    
             uplata=uplata*2 ;       
          }        
  printf ("Iznos od milijun kuna na racunu ce biti nakon %.0f godina.", i);     

  getch();       

}

2
Contributors
3
Replies
20
Views
3 Years
Discussion Span
Last Post by Ancient Dragon
1

I don't know python either. If you need it for school project then I assume they think you already know python. If you don't, then get a book or online tutorial and read it. You won't learn a thing if someone else does your schoolwork for you. Afterall, learnikng is why you are in school, isn't it???

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.